2012 Presidential Election Dot Maps

I recently came across this nifty dot map showing how different races are distributed throughout the country, and since I had the data handy, I thought I’d try something similar with the 2012 presidential election results.

These results are reported at the precinct level, but I disaggregated them to the Census block level in proportion to the 18+ year old population of each block within the precinct. Using ArcGIS, I placed dots for each voter randomly within their assigned Census block, so this isn’t an exact placement of everyone, but it’s pretty close, especially when zoomed out.

After that, I wrote a little Python/MySQL script to actually display the data. If you’re interested in playing around with it, I’ve put the code up at my Github. (The MySQL table is too large to post there, so if you want the data I used, download it here.) I’ve also made it so that you can display just a portion of the state. Below are maps of the Jacksonville area, as well as a map of Gainesville, which I’ve overlaid with a state roads shapefile. Click either for a larger view.