View source: R/metadata_functions.R
listCensusApis | R Documentation |
Scrapes https://api.census.gov/data.json and returns a dataframe that includes columns for dataset title, description, name, vintage, url, dataset type, and other useful fields.
listCensusApis(name = NULL, vintage = NULL)
name |
Optional complete or partial API dataset programmatic name. For
example, "acs", "acs/acs5", "acs/acs5/subject". If using a partial name,
this needs to be the left-most part of the dataset name before |
vintage |
Optional vintage (year) of dataset. |
A data frame with the following columns:
title: Short written description of the dataset.
name: Programmatic name of the dataset.
vintage: Year of the survey, for use with microdata and aggregate datasets.
type: Dataset type, which is either "Aggregate", "Microdata", or "Timeseries".
temporal: Time period of the dataset. Warning: not always documented.
spatial: Spatial region of the dataset. Warning: not always documented.
url: Base URL of the dataset endpoint.
modified: Date last modified. Warning: sometimes out of date.
description: Long written description of the dataset.
contact: Email address for specific questions about the Census Bureau survey.
Other metadata:
listCensusMetadata()
,
makeVarlist()
# Get information about every dataset available in the APIs
apis <- listCensusApis()
head(apis)
# Get information about all vintage 2022 datasets
apis_2022 <- listCensusApis(vintage = 2022)
head(apis_2022)
# Get information about all timeseries datasets
apis_timeseries <- listCensusApis(name = "timeseries")
head(apis_timeseries)
# Get information about 2020 Decennial Census datasets
apis_decennial_2020 <- listCensusApis(name = "dec", vintage = 2020)
head(apis_decennial_2020)
# Get information about one particular dataset
api_sahie <- listCensusApis(name = "timeseries/healthins/sahie")
head(api_sahie)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.