Description Usage Arguments Details Value References Examples
View source: R/census.helper.api.R
census.helper.api
links user-input dataset with Census data.
1 2 | census.helper.api(key, voters, states = "all", geo = "tract",
demo = FALSE)
|
key |
A required character object. Must contain user's Census API key, which can be requested here. |
voters |
An object of class |
states |
A character vector specifying which states to extract
Census data for, e.g. |
geo |
A character object specifying what aggregation level to use.
Use |
demo |
A |
This function allows users to link their geocoded dataset (e.g., voter file) with U.S. Census 2010 data. The function extracts Census Summary File data at the tract or block level using the 'UScensus2010' package. Census data calculated are Pr(Geolocation | Race) where geolocation is tract or block.
Output will be an object of class data.frame
. It will
consist of the original user-input data with additional columns of
Census data.
Relies on getCensusApi, getCensusApi2, and vecToChunk functions authored by Nicholas Nagle, available here.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.