View source: R/get-decennial-recs.R
get_decennial_recs | R Documentation |
Generate decennial estimates for multiple tables by tracts, counties, MSAs, or places.
get_decennial_recs( geography, counties = c("King", "Kitsap", "Pierce", "Snohomish"), table_codes, year, fips = NULL )
geography |
A character string as either 'tract', 'county', 'msa', or 'place'. |
counties |
A character string or vector of counties. Defaults to PSRC counties. |
table_codes |
A character string or vector of Census table codes. |
year |
Numeric. A decennial year equal or greater than 2010. |
fips |
Character. Single code or vector of either MSA or place fips codes. |
a tibble of decennial estimates by selected geography for selected table codes. Includes variable names.
Christy Lam
Sys.getenv("CENSUS_API_KEY") tbl_names <- paste0('PCT020', LETTERS[1:6]) get_decennial_recs(geography = 'county', table_codes = tbl_names, year = 2010) get_decennial_recs(geography = 'tract', table_codes = tbl_names, year = 2010) get_decennial_recs(geography = 'place', table_codes = 'PCT013', year = 2010, fips = c("5363000", "5308850")) get_decennial_recs(geography = 'msa', table_codes = c("H001", "P001"), year = 2010, fips = c('42660', "28420"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.