Menus Subscribe Search

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

July 30 • 10:00 AM

Having Difficult Conversations With Your Children

Why it’s necessary, and how to do it.


July 30 • 8:00 AM

How to Make a Convincing Sci-Fi Movie on a Tight Budget

Coherence is a good movie, and its initial shoot cost about the same amount of money as a used Prius.


July 30 • 6:00 AM

Are You Really as Happy as You Say You Are?

Researchers find a universal positivity bias in the way we talk, tweet, and write.


July 30 • 4:00 AM

The Declining Wage Gap for Gay Men

New research finds gay men in America are rapidly catching up with straight married men in terms of wages.


July 30 • 2:00 AM

LeBron James Migration: Big Chef Seeking Small Pond

The King’s return to Cleveland is a symbol for the dramatic shift in domestic as well as international migration.


July 29 • 4:00 PM

Are Children Seeking Refuge Turning More Americans Against Undocumented Immigrants?

A look at Pew Research Center survey data collected in February and July of this year.


July 29 • 2:00 PM

Under Water: The EPA’s Ongoing Struggle to Combat Pollution

Frustration and inaction color efforts to enforce the Clean Water Act.


July 29 • 12:40 PM

America’s Streams Are Awash With Pesticides Banned in Europe

You may have never heard of clothianidin, but it’s probably in your local river.


July 29 • 12:00 PM

Mining Your Genetic Data for Profit: The Dark Side of Biobanking

One woman’s personal story raises deep questions about the stark limits of current controls in a nascent industry at the very edge of the frontier of humans and technology.


July 29 • 11:23 AM

Where Should You Go to College?


July 29 • 10:29 AM

How Textbooks Have Changed the Face of War

War is more personal, less glorious, and more hellish in modern textbooks than in the past. But there’s still room for improvement.


July 29 • 10:00 AM

The Monolingual American: Why Are Those Outside of the U.S. Encouraging It?

If you are an American trying to learn German in a large German town or city, you will mostly hear English in return, even when you give sprechen your best shot.


July 29 • 8:00 AM

The Elusive Link Between Casinos and Crime

With a study of the impact of Philadelphia’s SugarHouse Casino, a heated debate gets fresh ammunition.


July 29 • 6:00 AM

What Are the Benefits of Locking Yourself in a Tank and Floating in Room-Temperature Saltwater?

After three sessions in an isolation tank, the answer’s still not quite clear.


July 29 • 4:00 AM

Harry Potter and the Battle Against Bigotry

Kids who identify with the hero of J.K. Rowling’s popular fantasy novels hold more open-minded attitudes toward immigrants and gays.


July 29 • 2:00 AM

Geographic Scale and Talent Migration: Washington, D.C.’s New Silver Line

Around the country, suburbs are fighting with the urban core over jobs and employees.


July 28 • 4:00 PM

Border Fences Make Unequal Neighbors and Enforce Social Inequality

What would it look like if you combined Israel, the West Bank, and Gaza, demographically speaking? What about the United States and Guatemala?


July 28 • 2:00 PM

Are Patient Privacy Laws Being Misused to Protect Medical Centers?

A 1996 law known as HIPAA has been cited to scold a mom taking a picture of her son in a hospital, to keep information away from police investigating a possible rape at a nursing home, and to threaten VA whistleblowers.


July 28 • 12:00 PM

Does Internet Addiction Excuse the Death of an Infant?

In Love Child, documentary filmmaker Valerie Veatch explores how virtual worlds encourage us to erase the boundary between digital and real, no matter the consequences.


July 28 • 11:11 AM

NASA Could Build Entire Spacecrafts in Space Using 3-D Printers

This year NASA will experiment with 3-D printing small objects in space. That could mark the beginning of a gravity-free manufacturing revolution.


July 28 • 10:00 AM

Hell Isn’t for Real

You may have seen pictures of the massive crater in Siberia. It unfortunately—or fortunately—does not lead to the netherworld.


July 28 • 8:00 AM

Why Isn’t Obama More Popular?

It takes a while for people to notice that things are going well, particularly when they’ve been bad for so long.


July 28 • 7:45 AM

The Most Popular Ways to Share Good and Bad Personal News

Researchers rank the popularity of all of the different methods we have for telling people about our lives, from Facebook to face-to-face.


July 28 • 6:00 AM

Hams Without Ends and Cats Tied to Trees: How We Create Traditions With Dubious Origins

Does it really matter if the reason for why you give money to newlyweds is based on a skewed version of a story your parents once told you?


July 28 • 4:00 AM

A Belief in ‘Oneness’ Is Equated With Pro-Environment Behavior

New research finds a link between concern for the environment and belief in the concept of universal interconnectedness.


Follow us


Subscribe Now

America’s Streams Are Awash With Pesticides Banned in Europe

You may have never heard of clothianidin, but it's probably in your local river.

How Textbooks Have Changed the Face of War

War is more personal, less glorious, and more hellish in modern textbooks than in the past. But there’s still room for improvement.

NASA Could Build Entire Spacecrafts in Space Using 3-D Printers

This year NASA will experiment with 3-D printing small objects in space. That could mark the beginning of a gravity-free manufacturing revolution.

The Most Popular Ways to Share Good and Bad Personal News

Researchers rank the popularity of all of the different methods we have for telling people about our lives, from Facebook to face-to-face.

Do Not Tell Your Kids That Eating Vegetables Will Make Them Stronger

Instead, hand them over in silence. Or, market them as the most delicious snack known to mankind.

The Big One

One in two full-time American fast-food workers' families are enrolled in public assistance programs, at a cost of $7 billion per year. July/August 2014

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