We were sitting around tonight and decided to whip something together to leverage twitter to get some real time election information.
It is ugly and open to bias but we’re hopping it might show something interesting.
We’re also planning to take snapshots of the map and assemble a time lapse for Wednesday.
See the map live at: http://election.setfive.com
Update at 4.40 EST:
So we’ve captured about 6000 tweets and the map is basically all blue. Just to clarify – we never intended this to be a serious vizualization or estimation of how the election is progressing. The project was soley meant to be a fun peak at how information spreads across Twitter.
Anyway, a couple of people have been asking about our methodoly so I’ll try and explain a bit.
We are using the Twitter Search API to run searches that we thought would indicate that someone just voted or intends to vote for either John McCain or Barrack Obama. Next, we apply some heuristics to the tweets to make sure they really are “just voted” tweets. If the tweet passes through the heuristics we record it for whichever candidate and then record the “from_user_id” to ensure a single user can’t blow up the vote totals.
In order to geolocate a user we are using the twittervision API I get the impression that the twittervision API just scrapes user profiles but I can’t verify this. We probably could have avoided using their API and just scraped ourselves but one less thing to deal with at 4am is always good.
The graph colors are calculated by taking the larger vote total (red vs blue) and then determining in percent, how much larger this is than the total number of votes for that state:
$totalScore=$state[‘redscore’]+$state[‘bluescore’];
$percentage=($state[‘redscore’]-$state[‘bluescore’])/$totalScore;
Anyway, there are defitley other entertaining things to do with twitter – we just haven’t thought of them yet. – Ashish
0 thoughts on “Guestimating the election with twitter”
Comments are closed.
Gramsay says:
My guess is it will all end up blue, I think twitter is more democrat
Ben says:
Interesting experiment.
Followed the link on mashable and I’ve blogged about it. http://www.likeaword.co.uk/2008/11/wisdom-of-twitter.html
f you fancied adding a little more code could you factor in the electoral college? Then we could see who twitter predicts will be president…
Hal says:
This might have been fun to build, but it’s an outright bad idea. The demographics of twitter completely fail to align with the demographics of registered voters. I even find this borderline irresponsible to even publish, albeit a fun experiment. Perhaps you should just do a better job making it clear how this will not likely represent the election results in any way.
John Kolbert says:
Hmm, interesting concept, but really all it shows is that more Obama fans use Twitter then McCain.
Ed Daniel says:
I love this kind of stuff, great use of the twitterverse.
An interesting slant would be charting the ‘influence factor’ according to each tweet’s following network and their geographic dispersion but I digress ;-)
Curious to know which approach to scoring you used for the tweets :-)
coreyo says:
Like the people above said, this might only say more Obama has more twitter fans. Another thing it could mean is that McCain fans are less likely to be vocal about their support.
Dean says:
Perhaps a link describing how you vote via Twitter?
Jim says:
Great idea guys…congrats
captures the zeitgeist in a real time fashion
for those that don’t like the sample, feeling twitter skews too young-
think of it as the pulse of the “real time” web/microblog generation
amazing in my view_super job and once again_congrats to all who had a hand in building it_
veltis says:
irresponsible? Pshh. Anyone whose vote is swayed by a clearly labeled “fun experiment” will be swayed by far more ubiquitous manipulations.