Tracking the presidential groundgame
As the two presidential campaigns launch into their final throws, we wanted to see who had the biggest footprint of campaign headquarters across the country. The map above ran with the resulting story showing Obama with a large advantage, especially in swing states. We thought getting from idea to map / chart would be as easy as checking the candidates’ websites or calling their press offices to request a full list. Not quite.
Finding Romney’s offices
Finding Obamas’s offices
President Obama has offices in many more states than Romney so going state by state is more of a hassle and his campaign’s website doesn’t have the same convenient state-by-state maps. Instead, you input your zip code and it gives you a map of all locations within forty miles of you.
It automatically looks within 40 miles of you but if you add “?distance=1000” at that url, it will search within however many miles you want.
So if you add the zip code for the rough geographic center of the US, Lebanon, Kansas and a distance of 10,000 miles you get something that looks like this:
which will give you a list, in JSON again, of every volunteer center in the country.
This list returns a lot of information we didn’t immediately need, though, like hours of operation and email address contacts. We wrote an R script that took just the fields the we needed for our map, mostly the latitude and longitude, city, and state and made a clean spreadsheet in CSV format.
From there we were able to do counts by state and plot them on a map. Once we had the final count, the Obama campaign confirmed that our number was in the right ballpark.
BONUS: Obama’s offices all include a Foursquare ID. If you want to play around with them, here’s the data, right click and choose “Save Links As…” if it doesn’t download automatically. Some interesting things could be finding the mayors of the obama campaign offices, which location has the most check-ins, check-ins over time in different locations etc. — let us know at email@example.com and we’ll put up your stuff.
- mhkeller reblogged this from newsbeastlabs
- countonlybluecars likes this
- thenoldtestament reblogged this from newsweek
- topicnews reblogged this from newsweek
- topicnews likes this
- 4thecrazy1s likes this
- katyetc reblogged this from merici
- greglinch likes this
- merici reblogged this from newsbeastlabs
- m-x likes this
- rotated8 reblogged this from newsbeastlabs
- magdelenaaa likes this
- husky04 reblogged this from newsweek
- mynameislinda likes this
- liquidfunk likes this
- samosass reblogged this from newsweek
- dearfriendyouarelovely likes this
- ashotofhelena likes this
- floipenstein reblogged this from newsweek
- wahlergebnisse reblogged this from newsweek
- weusedtorun likes this
- ecampusdotcom likes this
- steampoweredmedia likes this
- tijuana79 likes this
- ssnowwhitee reblogged this from newsweek
- ssnowwhitee likes this
- dubliner reblogged this from newsweek
- sommanita reblogged this from newsweek
- gonzni likes this
- lord-kitschener likes this
- talkdatatome reblogged this from newsbeastlabs
- moonlightandmoss reblogged this from newsweek
- thedivineasshole likes this
- janetmason23 likes this
- wanderin-der-welt likes this
- newsweek reblogged this from newsbeastlabs and added:
- cheatsheet likes this
- newsbeastlabs posted this