Learn R Programming

censusapi (version 0.4.1)

listCensusMetadata: Get variable or geography metadata for a given API as a data frame

Description

Get variable or geography metadata for a given API as a data frame

Usage

listCensusMetadata(name, vintage = NULL, type = "variables")

Arguments

name

API name - e.g. acs5. See list at https://api.census.gov/data.html

vintage

Vintage of dataset, e.g. 2014 - not required for timeseries APIs

type

Type of metadata to return, either "variables", "geographies" or "geography", or "groups". Default is variables.

Examples

Run this code
# NOT RUN {
bds_vars <- listCensusMetadata(name = "timeseries/bds/firms", type = "variables")
head(bds_vars)

bds_geos <- listCensusMetadata(name = "timeseries/bds/firms", type = "geography")
head(bds_geos)

acs_geos <- listCensusMetadata(name = "acs/acs5", vintage = 2016, type = "geography")
head(acs_geos)

acs_groups <- listCensusMetadata(name = "acs/acs5", vintage = 2016, type = "groups")
head(acs_groups)
# }

Run the code above in your browser using DataLab