Description Usage Arguments Details Value Author(s) References Examples
View source: R/CensusAPI2000Spatial.R
Allows the user to access all Summary File 1 (SF1; 100-percent data; http://www.census.gov/prod/cen2000/doc/sf1.pdf) and SF3 (economic data). Requires the user to sign up for US Census API key, see http://api.census.gov/data/key_signup.html.
1 2 3 | CensusAPI2000Spatial(variables, state.fips,
level = c("county", "tract", "block group", "block", "cdp"),
key, summaryfile = c("sf1", "sf3"), sp.object = NULL)
|
variables |
This takes a character vector of SF1 IDs or ACS IDs, see http://www.census.gov/prod/cen2010/doc/sf1.pdf for SF1 and http://www.census.gov/programs-surveys/acs/ for ACS variables. |
state.fips |
State fips for desired demographic variables. |
level |
Takes "county", "tract", "block group", "block", or "cdp" |
key |
User provided key (see http://api.census.gov/data/key_signup.html) |
summaryfile |
"sf1" or "ACS" |
sp.object |
sp object |
Add API Details.
data.frame object.
Zack W. Almquist (almquist@umn.edu), Scott Chase (chase245@umn.edu)
Zack W. Almquist (2010). US Census Spatial and Demographic Data in R: The UScensus2000 Suite of Packages. Journal of Statistical Software, 37(6), 1-31. http://www.jstatsoft.org/v37/i06/.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
key="YOUR KEY HERE"
sf1variables<-c("P001001","P003002",
"P003003","P003004","P003005")
sf3variables<-c("PCT024001",
"PCT024002","PCT024013")
mainecdp<-CensusData2000Spatial(sf1variables,
state.fips=c("01","27"),level="cdp",key,summaryfile="sf1")
az<-CensusData2000Spatial(sf1variables,
state.fips="04",level="tract",key,summaryfile="sf1")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.