Menus Subscribe Search

Follow us


Predicting House Races by Weight of Tweet

• October 31, 2012 • 4:00 AM

With the presidential prediction game dreadfully same-y, surely there’s another constantly changing fix for political junkies. How about forecasting all 435 U.S. congressional races every day, based on brand new data every day?

That’s what you get at “Voting With Your Tweet,” an experiment that mines mentions of congressional candidates in the Twitter-sphere to predict who will win each race and what the actual vote share will be. Unlike past efforts at using social media to predict political contests, which made their “predictions” after the voters had settled the matter, this research is happening now and you can check in at the California News Service site to see what’s up today, yesterday, or tomorrow.

Using social media as a forecasting tool is a hot area right now, and mixing Twitter with punditry is not brand new. Carnegie Mellon’s Brendan O’Connor compared tweeting to polling results in 2010, and not surprisingly found some correlation. Andranik Tumasjan and his colleagues at the Munich Technical University found that “the mere number of messages mentioning a party reflects the election result” in a German federal election. The “media utility” Tweetminster, meanwhile, says it accurately predicted the outcome of the last British Parliamentary elections using Twitter (an experiment they note is based on an earlier Japanese study looking at “online buzz and election results”).

Voting With Your Tweet is a kind of combination, using past results to predict future returns (but with mountains of caveats).

Analyzing about a quarter million tweets from 356 races in the 2010 mid-terms, UC Berkeley doctoral candidate Mark Huberty correctly “predicted” (after the fact) the winners 92 percent of the time, a much better showing than the six professional human pundits used for comparison. (The technical report on 2010 is available here, but be prepared to see that the 92 percent figure is one of a number of outcomes based on different statistical methods and statistical approaches. Huberty goes with “better than 85 percent accuracy” in the paper’s introduction.)

Taking that information, Huberty “trained two machine learning algorithms to determine what word features of those tweets best predicted whether the Democratic or Republican party candidate won each race.” So in its current incarnation …

We think the finished algorithm works like this:

First, it identifies from the language in a candidate’s tweets whether they are the incumbent or challenger. Since incumbents win about 85% of the time, this provides a good baseline.

It then adjusts the baseline prediction based on sentiment and action-related phrases. For instance, “voted hcr” (indicating that the incumbent voted for health care reform) was one of the most influential predictors alongside incumbency-related phrases. The algorithm weights those phrases positively or negatively, depending on how predictive they were of a candidate winning or losing.

And you can take this forecast to the bank? Only if you’re Lehman Brothers. “Voting with your Tweet is an experiment and should be treated as such,” Huberty and “data guru” Len DeGroot from the Knight Digital Media Center at Berkeley’s Graduate School of Journalism write in an honest and detailed set of FAQs. “We think this might work and think we might know why. But we could fail spectacularly.”

So why do it at all, or at least so publicly? The answers are refreshing:

Anyone who is interested can observe the experiment.
It keeps us honest: whether we succeed or fail, the predictions will be out there for all to see.
Observers can offer constructive feedback.
It gives us the opportunity post our own observations.
It offers the general public a window into the intersection of social data and political research.

So knowing this, I peeked at the putative winners for some races I’m following, starting with the competitive bout between Democratic incumbent Lois Capps and challenger Abel Maldonado in California’s 24th, Pacific Standard’s home turf. As of last night, VWYT gives it to Maldonado, with 53 percent of the vote.

Then there’s Berman-Sherman, the heated race between two Democratic incumbents battling for a single seat in LA? Ah nothing, not even Brad Sherman’s name, since the algorithm only codes for races with a Republican-Democratic contest.

OK, how about Kansas’s 2nd, the district where my mom is buried? (Kansas not being Chicago or Louisiana, Mom can’t vote there.) Incumbent Republican Lynn Jenkins is shellacking Tobias Schlingensiepen with a 65 percent prediction. That’s not surprising in this very blue state, but I wonder if the challenger’s name isn’t a bit Twitter-unfriendly.

As suggested, Huberty and co. see lots of ways this experiment can go pear-shaped, many of the potential problems hinging on using 2010 results to craft important topic choices this year. The mid-terms, after all, saw a powerful effort by Tea Party partisans, which could mean the terms over-represent Republican memes and challengers’ chops. Plus, there are new issues in the mix now, such as Libya and Solyndra.

Nonetheless, it’s fun to see political science in action and even better that for once it’s not about those two guys running for president.

Michael Todd
Most of Michael Todd's career has been spent in newspaper journalism, ranging from papers in the Marshall Islands to tiny California farming communities. Before joining the publishing arm of the Miller-McCune Center, he was managing editor of the national magazine Hispanic Business.

More From Michael Todd

A weekly roundup of the best of Pacific Standard and PSmag.com, delivered straight to your inbox.

Recent Posts

October 31 • 4:00 PM

Should the Victims of the War on Drugs Receive Reparations?

A drug war Truth and Reconciliation Commission along the lines of post-apartheid South Africa is a radical idea proposed by the Green Party. Substance.com asks their candidates for New York State’s gubernatorial election to tell us more.


October 31 • 2:00 PM

India’s Struggle to Get Reliable Power to Hundreds of Millions of People

India’s new Prime Minister Narendra Modi is known as a “big thinker” when it comes to energy. But in his country’s case, could thinking big be a huge mistake?


October 31 • 12:00 PM

In the Picture: SNAP Food Benefits, Birthday Cake, and Walmart

In every issue, we fix our gaze on an everyday photograph and chase down facts about details in the frame.


October 31 • 10:15 AM

Levels of Depression Could Be Evaluated Through Measurements of Acoustic Speech

Engineers find tell-tale signs in speech patterns of the depressed.


October 31 • 8:00 AM

Who Wants a Cute Congressman?

You probably do—even if you won’t admit it. In politics, looks aren’t everything, but they’re definitely something.


October 31 • 7:00 AM

Why Scientists Make Promises They Can’t Keep

A research proposal that is totally upfront about the uncertainty of the scientific process and its potential benefits might never pass governmental muster.


October 31 • 6:12 AM

The Psychology of a Horror Movie Fan

Scientists have tried to figure out the appeal of axe murderers and creepy dolls, but it mostly remains a spooky mystery.


October 31 • 4:00 AM

The Power of Third Person Plural on Support for Public Policies

Researchers find citizens react differently to policy proposals when they’re framed as impacting “people,” as opposed to “you.”


October 30 • 4:00 PM

I Should Have Told My High School Students About My Struggle With Drinking

As a teacher, my students confided in me about many harrowing aspects of their lives. I never crossed the line and shared my biggest problem with them—but now I wish I had.


October 30 • 2:00 PM

How Dark Money Got a Mining Company Everything It Wanted

An accidentally released court filing reveals how one company secretly gave money to a non-profit that helped get favorable mining legislation passed.


October 30 • 12:00 PM

The Halloween Industrial Complex

The scariest thing about Halloween might be just how seriously we take it. For this week’s holiday, Americans of all ages will spend more than $5 billion on disposable costumes and bite-size candy.


October 30 • 10:00 AM

Sky’s the Limit: The Case for Selling Air Rights

Lower taxes and debt, increased revenue for the city, and a much better use of space in already dense environments: Selling air rights and encouraging upward growth seem like no-brainers, but NIMBY resistance and philosophical barriers remain.


October 30 • 9:00 AM

Cycles of Fear and Bias in the Criminal Justice System

Exploring the psychological roots of racial disparity in U.S. prisons.


October 30 • 8:00 AM

How Do You Make a Living, Email Newsletter Writer?

Noah Davis talks to Wait But Why writer Tim Urban about the newsletter concept, the research process, and escaping “money-flushing toilet” status.



October 30 • 6:00 AM

Dreamers of the Carbon-Free Dream

Can California go full-renewable?


October 30 • 5:08 AM

We’re Not So Great at Rejecting Each Other

And it’s probably something we should work on.


October 30 • 4:00 AM

He’s Definitely a Liberal—Just Check Out His Brain Scan

New research finds political ideology can be easily determined by examining how one’s brain reacts to disgusting images.


October 29 • 4:00 PM

Should We Prosecute Climate Change Protesters Who Break the Law?

A conversation with Bristol County, Massachusetts, District Attorney Sam Sutter, who dropped steep charges against two climate change protesters.


October 29 • 2:23 PM

Innovation Geography: The Beginning of the End for Silicon Valley

Will a lack of affordable housing hinder the growth of creative start-ups?


October 29 • 2:00 PM

Trapped in the Tobacco Debt Trap

A refinance of Niagara County, New York’s tobacco bonds was good news—but for investors, not taxpayers.


October 29 • 12:00 PM

Purity and Self-Mutilation in Thailand

During the nine-day Phuket Vegetarian Festival, a group of chosen ones known as the mah song torture themselves in order to redirect bad luck and misfortune away from their communities and ensure a year of prosperity.


October 29 • 10:00 AM

Can Proposition 47 Solve California’s Problem With Mass Incarceration?

Reducing penalties for low-level felonies could be the next step in rolling back draconian sentencing laws and addressing the criminal justice system’s long legacy of racism.


October 29 • 9:00 AM

Chronic Fatigue Syndrome and the Brain

Neuroscientists find less—but potentially stronger—white matter in the brains of patients with CFS.


October 29 • 8:00 AM

America’s Bathrooms Are a Total Failure

No matter which American bathroom is crowned in this year’s America’s Best Restroom contest, it will still have a host of terrible flaws.


Follow us


Levels of Depression Could Be Evaluated Through Measurements of Acoustic Speech

Engineers find tell-tale signs in speech patterns of the depressed.

We’re Not So Great at Rejecting Each Other

And it's probably something we should work on.

Chronic Fatigue Syndrome and the Brain

Neuroscientists find less—but potentially stronger—white matter in the brains of patients with CFS.

Incumbents, Pray for Rain

Come next Tuesday, rain could push voters toward safer, more predictable candidates.

Could Economics Benefit From Computer Science Thinking?

Computational complexity could offer new insight into old ideas in biology and, yes, even the dismal science.

The Big One

One town, Champlain, New York, was the source of nearly half the scams targeting small businesses in the United States last year. November/December 2014

Copyright © 2014 by Pacific Standard and The Miller-McCune Center for Research, Media, and Public Policy. All Rights Reserved.