the kdmcinfo weblog

Can Twitter predict an election?

Map showing total tweets per district.

Can Twitter predict an election? That's a question that kdmcBerkeley's Len De Groot and UC Berkeley PhD candidate, Political Science Mark Huberty are trying to answer with their latest experiment: Voting With Your Tweet.  

They aren’t the first research team to ask this question. However, this is one of the first attempts to formulate a large-scale prediction before the election. Where previous studies have tried to correlate old tweets to the final outcome of an election, Mark and Len have built a living tool that predicts the winner of congressional elections each day based on ongoing Twitter feeds. 

Every night the team mines the latest tweets mentioning 2012 congressional candidates. They funnel the cumulative tweets through a series of algorithms to predict which party will win the race and the percent of the vote each candidate will get. (To better understand how the algorithm works, you can learn more here). The team has made it easy for you to see how these predictions change over time via interactive district maps.

If you are feeling skeptical about these predictions, you should be. Len and Mark are the first to say this tool is foremost an experiment. So far the predictions are not following the same trend as other major polls. Today’s map shows a greater number of Republican victories. But just because this tool may or may not prove to be a perfect predictor of elections, doesn't mean there aren't some interesting insights to glean from it.

Consider California's District 2. In mid-September, the win/loss map predicted Republican candidate Dan Roberts would beat out Democrat Jared Huffman. Three weeks later tweets suggested Huffman was in the lead. Does this indicate a tight race, where the election will be a close call? Or, perhaps, was there another catalyst that increased the community's interest or favor with Huffman? Perhaps Twitter can be a strong mood indicator of different constituencies.

One thing is for sure—this project will help us better understand how we all use Twitter during election years. Len and Mark will be updating their project over the next month with data on the number of tweets per candidate and different analyses of the tweet content.

Check back on Election Night to see how well this Twitter experiment predicted the outcome.

(For those interested in learning how to make their own data visualization projects, come check out our Data Viz Workshop on January 7-8, 2013).