View source: R/get-decennial-recs.R
get_decennial_recs | R Documentation |
Generate decennial estimates for multiple tables by tracts, counties, MSAs, or places. Currently only working for SF1 tables.
get_decennial_recs(
geography,
counties = c("King", "Kitsap", "Pierce", "Snohomish"),
sumfile = "sf1",
years,
variables = NULL,
table_codes = NULL,
fips = NULL
)
geography |
A character string as either 'tract', 'county', 'block group', 'msa', or 'place'. |
counties |
A character string or vector of counties. Defaults to PSRC counties. |
sumfile |
A character string for which summary file to use such as "sf1" or "dp" |
years |
Numeric or a vector of numeric years. A decennial year or years equal or greater than 2000. |
variables |
A character string or vector of Census variables |
table_codes |
A character string or vector of Census table codes, the table code will be padded with 0s such as "H001", as opposed to "H1" |
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
tbl_names <- paste0('PCT020', LETTERS[1:6])
get_decennial_recs(geography = 'county', table_codes = tbl_names, years = 2010)
get_decennial_recs(geography = 'county', table_codes = 'P001', years = c(2000, 2010))
get_decennial_recs(geography = 'tract', table_codes = tbl_names, years = 2010)
get_decennial_recs(geography = 'place',
table_codes = 'PCT013',
years = 2010,
fips = c("5363000", "5308850"))
get_decennial_recs(geography = 'msa',
table_codes = c("H001", "P001"),
years = c(2000, 2010),
fips = c('42660', "28420"))
get_decennial_recs(geography = 'block group',
table_codes = c('H001', 'H006'),
years = 2010)
get_decennial_recs(geography="tract",
variables="DP1_0092C",
years=2020, sumfile="dp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.