get_dataset_names {RcensusPkg} | R Documentation |
get_dataset_names
Description
Get the acronym names and descriptions of the Census Bureau's datasets.
Function produces a data.table
of the Census Bureau's dataset acronym names
that can be used in other RcensusPkg::
functions calling for a dataset acronym name.
See Census Bureau's publicly available datasets
for descriptions. Also see All Surveys and Programs
Usage
get_dataset_names(
vintage = NULL,
filter_name_str = NULL,
filter_title_str = NULL,
ignore_case = TRUE,
brief = TRUE
)
Arguments
vintage |
An optional numeric for the year to select the datasets. If NULL, then all the years are returned. |
filter_name_str |
An optional character string by which to filter the resultant |
filter_title_str |
An optional character string by which to filter the resultant |
ignore_case |
A logical which if |
brief |
A logical which if |
Value
A list with a data.table
of dataset names (named "data")
and a vector of unique vintages (named "vintages").
Examples
## Not run:
# Requests for Census Bureau descriptions takes well over 10
# seconds in most cases.
library(data.table)
library(jsonlite)
library(httr2)
library(RcensusPkg)
# Get descriptions/vintages for 2020 datasets with "acs5" in their name.
acs5_datasets_ls <- RcensusPkg::get_dataset_names(
vintage = 2020,
filter_name_str = "acs5/"
)
## End(Not run)