CensusAPI2000Spatial: US Census API function

Description Usage Arguments Details Value Author(s) References Examples

View source: R/CensusAPI2000Spatial.R

Description

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.

Usage

1
2
3
CensusAPI2000Spatial(variables, state.fips, 
level = c("county", "tract", "block group", "block", "cdp"), 
key, summaryfile = c("sf1", "sf3"), sp.object = NULL)

Arguments

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

Details

Add API Details.

Value

data.frame object.

Author(s)

Zack W. Almquist (almquist@umn.edu), Scott Chase (chase245@umn.edu)

References

http://api.census.gov/

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/.

Examples

 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)

UScensus2000 documentation built on May 2, 2019, 5:13 p.m.