View source: R/get_usa_demographics.R
get_tract_demographics | R Documentation |
The data comes from the American Community Survey (ACS). The variables are total population and median household income.
get_tract_demographics(
state_name,
county_fips = NULL,
endyear = 2013,
span = 5
)
state_name |
The name of the state. See ?state.regions for proper spelling and capitalization. |
county_fips |
An optional vector of county fips codes within the state. Useful to set because getting data on all tracts can be slow. |
endyear |
The end year for the survey |
span |
The span of the survey |
# 36061 is the FIPS code for Manhatttan (technically "New York County"), NY.
df = get_tract_demographics("new york", 36061)
df$value = df$median_hh_income
tract_choropleth(df, "new york", county_zoom = 36061)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.