From charlesreid1

Revision as of 05:46, 8 February 2015 by Admin (talk | contribs)

My goal is to set up a map that connects census tract data with some other census data, e.g., population or median income.

Census.gov API Key

I started with the SunglightLabs Census library, which provides a Python wrapper to the 2010 Census data API (wow!):

https://github.com/sunlightlabs/census

But it requires a developer key from census.gov (obtained here http://www.census.gov/developers/), which I requested, and then waited, and waited, and waited...

Census Reporter API

After giving up on waiting for a Census.gov developer key in the next day, I found the census reporter API, which allows for queries of census data in a very sensible REST format.

Detailed documentation of their API available here: https://github.com/censusreporter/census-api/blob/master/API.md

A very, very nice interface!

Mapping

Mapping County Boundaries

To map census data, I wanted to get shapefile information.

Here's shapefile information provided by the Census Bureau: http://www.census.gov/cgi-bin/geo/shapefiles2010/main

I started with a county map of California, tl_2010_06_county10.zip. The zip file contained a set of files, including the shapefile. I fired up QGIS to have a look at it.

QGIS CaliforniaCounties.png

Dittos for a US counties map, it was around 70 MB and straightforward to load with a map:

QGIS USCounties.png