Description Usage Arguments Value
Add Census demographics data to your simple features object
1 2 | AddCensusDemographics(map, year = 2010, state, county = NULL,
demographicvars = NULL, api_key = NULL)
|
map |
A simple features map covering a part of one (and only one) state. |
year |
The Census year from which you want data. |
state |
The state that contains map. Accepts FIPS code and two letter abreviation. |
county |
The FIPS code of the county/counties containing map. This defaults to NULL, but the function runs more quickly the fewer counties downloaded. |
demographicvars |
The demographic variables you want to add. If NULL (the default) it downloads the total population which is "P0010001" for 2010 and "P001001" for 1990 and 2000. Codes can be looked up at https://api.census.gov/data.html by clicking on "variables" next to the Census year you want. |
api_key |
Your census API key. Works with NULL (default), but you are subject to limits without a key. |
A new simple features object with U.S. Census demographic data added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.