RainbowStats Command Reference

SOCRATA_SEARCH

Discover public Socrata datasets and copy a ready-to-run command for each numeric field.

Returns a search table

Syntax

SOCRATA_SEARCH("SearchTerm")
ArgumentMeaning
SearchTermA nonempty subject, keyword, or dataset title, such as education, crime, or emergency department visits.

Examples

SOCRATA_SEARCH("education")
SOCRATA_SEARCH("violent crime")
SOCRATA_SEARCH("COVID-Like Illness")

Reading the search table

Each row represents one numeric field. A dataset with several numeric fields appears on several rows, each with its own command.

ColumnWhat it tells you
ID / DatasetSocrata dataset identifier and title.
Field / API headerReadable field name and exact API field name. Use the API header in commands.
DescriptionPublisher’s explanation of the field, when available.
UnitsCatalog display format when supplied, such as a percentage or currency format. Blank means unspecified; no unit conversion is applied.
Data typeCatalog type of the numeric field.
Time fieldAvailable date fields, or a field named year. Several dates may require a dataset-specific choice.
ProviderPublisher attribution, when provided. The source URL identifies the portal.
Last updated (UTC)Dataset update date from the catalog. This is not the last nonmissing date for the selected field.
Dataset notesA shortened publisher description, including archival notes when present.
SOCRATA commandQuoted command for this exact field. Copy it into the script.
URLDataset page for the complete description, definitions, license, and source notes.

From search to chart

SOCRATA_SEARCH("COVID-Like Illness")
Visits=SOCRATA("qwib-edaw","total_covid_daily")
LINE_CHART(Visits)

Check coverage before analysis

Catalog dates are not field coverage. Two fields in the same dataset can stop on different dates. For example, the historical Chicago dataset’s total_cli_daily values end in June 2021, while total_covid_daily continues through October 2024.

The search does not download every field to calculate nonmissing counts and first/last observations. Inspect the retrieved series or cross section before aligning data or interpreting a chart. A date field alone does not guarantee one observation per date.

Scope and behavior

The command uses the US Socrata Discovery catalog and includes ordinary datasets. It displays numeric fields supported by the reader. Datasets without supported numeric fields do not produce field rows. Catalog coverage and the configured match limit determine which datasets appear; the table is not a complete global inventory.

Dataset metadata is cached for six hours. For the source’s complete methodology and usage terms, follow the dataset URL.

Source

Socrata Discovery API · Socrata developer documentation

Related commands

SOCRATA · CFTC_TFF_SEARCH · CFTC_TFF