View source: R/import_census.R
ff_iterate_acs | R Documentation |
This function makes repeated calls to the Census API through the tidycensus package. It allows users to import multiple years and geographic areas with one function call.
ff_iterate_acs(parameters_list)
parameters_list |
A named list of parameters to feed into the get_acs function from tidycensus. The name of each item should correspond to the parameter name in get_acs. |
A tidy dataframe with all census data. Additional columns for the yar and geographic region are added.
parameters <- list(geography = c('us', 'state', 'county', 'tract'), state = c(NA, rep('NC', 3)), county = c(rep(NA, 3), 'Forsyth'), table = c(rep('S2301', 3), NA), variables = c(rep(NA, 3), 'S2301_C03_001'), survey = c(rep('acs1', 3), 'acs5'), year = rep(current_year, 4), use_table = c(rep(T, 3), F)) employment <- ff_iterate_acs(parameters)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.