Getting started with census

Using getCensus

Below we will collect census data for the US cities of Chicago and New York. Our radius will be the boundary around the coordinates of the city and the getCensus function will output out census data for each city in the given boundary.

library(census)

# City level data for Chicago and New York
radius <- 2
cities <- c("Chicago, IL", "New York")
df <- getCensus(cities, radius)
## [[1]]
## [1] "http://mcdc.missouri.edu/cgi-bin/broker?_PROGRAM=websas.caps10acsb.sas&SERVICE=appdev&sitename=Chicago&longitude=-87.6297982&latitude=41.8781136&radii=2&dprofile=on&eprofile=on&sprofile=on&hprofile=on&cntypops=on&printdetail=on&_debug="
## 
## [[2]]
## [1] "http://mcdc.missouri.edu/cgi-bin/broker?_PROGRAM=websas.caps10acsb.sas&SERVICE=appdev&sitename=NewYork&longitude=-74.0059728&latitude=40.7127753&radii=2&dprofile=on&eprofile=on&sprofile=on&hprofile=on&cntypops=on&printdetail=on&_debug="
df[1:2, c(1:2,12,55,59,164,252,254,305,336,477)]
##   sitename radius  TotPop pctMales pctFemales AvgFamInc pctPrivWageWorkers
## 1  Chicago      2 188,040     48.0       52.0  $192,455               86.7
## 2  NewYork      2 444,373     49.2       50.8  $189,738               84.9
##   pctGovWorkers pctMarried pctBachelors MedianHValue
## 1           9.0       35.3         38.9     $430,285
## 2           7.2       35.5         36.4     $1009199

Additional resources

Disclaimer

This product uses the Google Maps API and collects data from the Missouri Census Data Center, but is not endorsed or certified by Google or the Missouri Census Data Center.