get_state_demographics {choroplethr} | R Documentation |
Get a handful of demographic variables on US States from the US Census Bureau as a data.frame.
Description
The data comes from the American Community Survey (ACS). The variables are total population and median household income.
Usage
get_state_demographics(endyear = 2013, span = 5)
Arguments
endyear |
The end year for the survey |
span |
The span of the survey |
Examples
# get some demographic data on US states from the 2010 5-year ACS
df = get_state_demographics(endyear=2010, span=5)
# A choropleth map shows the location of the values.
# Set the 'value' column to be the column we want to render.
df$value = df$median_hh_income
state_choropleth(df)
[Package choroplethr version 4.0.0 Index]