Exploring census and demographic data with R

I wanted to use R to explore how to access and visualize census data, home value data and school rating data using Indianapolis metro area as an example. My learning objectives here are to learn how to use R to:

  • Make choropleth maps at zip code level
  • Process data in XML or JSON format that is returned when using API provided by websites (here I chose Zillow and education.com as an example)

The data that I wanted to overlay over the Indianapolis map was median age, median income, median home listing price/value per sq feet, and school rating at the zip code level. I got the census data using US census data API, zip level home demographic data using Zillow demographic API, school rating data using education.com API. (Disclaimer: This is only a one off use of Zillow API and education.com API. I believe I am in compliance with the terms of use of these API for Zillow and education.com. However, if somebody notices any violation of terms of use of these API, please bring it to my attention and I will remove this material). I should also note here that there are several nice interactive tools and widgets on the web that get the same information. My purpose here is just to play with R to extract and visualize this data.

The full R code along with explanation can be found here.

The maps of median age, median household income, median home listing price/value per sq feet and school rating overlaid over Indianapolis map is shown below

medianAgeMap

medianIncomeMapmedianListPrice

medianValperSqFtschoolRating

Advertisements
This entry was posted in R. Bookmark the permalink.

3 Responses to Exploring census and demographic data with R

  1. Pingback: Exploring census and demographic data with R - R Project Aggregate

  2. Paul C. McMurray says:

    Dabbler , I love your presentation and want to use it for a study of Atlanta Beltline Demographics. However, none of you link work and I can not get to your code. Could you email Paul C. McMurray at pcm5@comcast.net with any updated referenced. Loved the presentation.

  3. notesofdabbler says:

    Paul, Thanks for your interest. I just checked and it looks like some of the APIs that I used when creating the post seem to have moved their web pages. At least I found why the code link was not working. Looks like there was some change in bitbucket url where the code is. The following link has the R code: https://notesofdabbler.bitbucket.io/2013_12_censusBlog/censusHomeValueExplore_wdesc.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s