Learn R Programming

dataseries (version 1.0.0)

ds_search: Search for series across all datasets

Description

Returns a flat, searchable table of the individual series available across every dataset on dataseries.org — one row per series. This is the finest-grained way to discover what exists: grep it, or pass a pattern to filter. The dataset, dim and code columns are exactly what you feed back to ds().

Usage

ds_search(pattern = NULL)

Value

A data.frame with the columns dataset, dataset_title, frequency, dim, code, label and path.

Arguments

pattern

optional search string, treated as a case-insensitive regular expression and matched against the series label and dataset_title. When NULL (the default) the full table is returned.

See Also

ds_catalog() for the dataset-level list and ds_meta() for one dataset's dimensions.

Examples

Run this code
if (FALSE) {
# everything
ds_search()

# find unemployment series, then download one
hits <- ds_search("unemployment")
head(hits)
ds(hits$dataset[1], setNames(list(hits$code[1]), hits$dim[1]))
}

Run the code above in your browser using DataLab