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:
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
I'd have used a divergent color scheme (red @ 0%, white at 50%, blue @ 100%)
Posted by: Mike Lawrence | March 01, 2011 at 17:16