Mapping the Chicago mayoral election

March 1, 2011
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

Rahm Emanuel is now Mayor of Chicago, having successfully defended a court challenge to his candidacy and then 5 rivals in the February 22 election. The Chicago Tribune has put together an interactive map of the results (color-coded by the winner in each precinct), but for R hackers who would like to create similar maps of other elections, the blog Offensive Politics shows us how using the Chicago election as a guide. In the post, you can find a step by step guide on converting the return data file, processing shape files to create maps, and mapping the results to the precincts to create choropleths like this:

Emanuel
All the code is available in a github repository, and would serve as a great framework for your own election mapping projects.

Offensive Politics: Mapping the 2011 Chicago Mayoral Democratic Primary

To leave a comment for the author, please follow the link and comment on his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.