Retrieves Relevant Census Variables from American Community Survey (2021)
Get_Census_Vars_ACS.Rd
This function retrieves the variables related to median household income, employment status and languages spoken for each county from the American Community Survey (5-year average, 2021). These variables are then used to render plots in the tool.
Arguments
- df_locations
Data frame of cities, counties and states within the range of a circle buffer determined by the location of nearest grocery stores. This data frame is inherited from the return of DSPGrocery::Create_Circle_Buffer as df_census_call.
Value
The output returns a data frame of the ACS5 variables for median household income, employment status and languages spoken for each county.
Details
This function receives the data frame of cities, counties and states within the circle buffer established by the market size spatial calculations and outputs census data for each county. This functions uses the Census API through the package TidyCensus to retrieve data using the function "get_acs()"