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

Description Usage Arguments Examples

View source: R/metadata_functions.R

Description

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

Usage

1
2
listCensusMetadata(name, vintage = NULL, type = "variables",
  group = NULL)

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.

group

An optional variable group code, used to return metadata for a specific group of variables only.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
bds_vars <- listCensusMetadata(name = "timeseries/bds/firms", type = "variables")
head(bds_vars)

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

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

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

group_B17020 <- listCensusMetadata(name = "acs/acs5",
vintage = 2017,
type = "variables",
group = "B17020")
head(group_B17020)

censusapi documentation built on May 2, 2019, 9:39 a.m.