Predicting the Next President of the United States Using Twitter Analysis

Posted on November 6th 2012

Predicting the Next President of the United States Using Twitter Analysis

In the history books when they come to write down the name of the President of the United States of America 2012, little will be said as to how they got there. Key battlegrounds and events may be mentioned but a main feature of this year’s election campaigns will probably not be written about. In 2008 the year that Obama won his first term, Facebook had only just released it’s instant messaging service and the newsfeed was only a year old, whilst Twitter was only two years old and was only being used by the early tech massive.

The campaigns this year has had a social feel, hash tags have been used in advertising, plenty of specific campaigns targeting social networking users and Mr Obama even went on Reddit for a Q&A and didn’t get a battering.

We thought it might be cool to find out what the current swing states* (whom will decide who the de-facto leader of the western world will be) are saying on Twitter. We’ve used sentiment analysis and looked at influencers before when talking about Football but for one day only We Play become We Politicise.

* In United States presidential politics, a swing state is a state in which no single candidate or party has overwhelming support in securing that state’s electoral college votes.

Who will win based on Sentiment?

We’ve looked at all the Tweets mentioning ‘Romney’ or ‘Obama’ in the entirety of the swing states over the last week and using a sentiment score, which figures out the positivity of what’s being said on each day and quantifies it out of 100. We then averaged all the days out and before you can say God Bless America we have each candidates ‘Positivity’ score - that being the percentage of positive things being said directly about them from Twitter users.

The scores are:

Obama: 48%

Romney: 36%

Below are the two graphs, which represent the sentiment.

Fig. A - Sentiment chart for Barack Obama over past seven days

Fig. A - Sentiment chart for Barack Obama over past seven daysFig. A - Sentiment chart for Barack Obama over past seven days

Fig. B - Sentiment chart for Mitt Romney over past seven days

As you can see Romney’s negative tweets outweigh his positives heavily until Nov 4th where they briefly take over, only to be retaken over again on Nov 5th. Whilst Obama’s diagram doesn’t look much more positive on Nov 4th and Nov 5th his positive Tweets clearly pull away from the negative wins- potentially highlighting a sea of change in the undecided polls.

So first blood goes to the incumbent president. Sadly we couldn’t look at each State individually to get a better look about who may win where but an interesting fact is that neither candidate has over a 50% preference rate. This highlights why these are ‘Swing states’ as neither candidate are preferred so more work is put into to convert the vote.

If we convert these statistics into a voting turnout, we can look at how the electoral registers per state (which decide on the President) match up and here we can see how each candidate would fare.

Fig. C - Sentiment converted to votes

Fig. C - Sentiment converted to votes

* Based on BBC data

Based on our sentiment analysis then Obama is only two electoral votes off from winning majority whilst Romney is a massive 25 electoral votes off from a majority. With most commentators giving Obama a percentage lead in both Ohio and Pennsylvania (of which carry a large amount of electoral votes) based on this we believe that Obama will win.


Who will win based on Tweets?

The sentiment stuff is very pretty and gives us some interesting talking points, but the hard data doesn’t actually give us an outright winner, so we’ll now look at complete mentions.

Fig. D – Twitter mentions – Obama vs Romney over past seven days 

Fig. E – Twitter mentions – Obama vs Romney over past seven days

Figure D show’s the mentions of each candidate with Obama in blue and Romney in green- it’s clear that Obama is in the lead over the last week. Both candidates were neck and neck until October the 29th and then Obama took over in mentions in all swing states.

Fig. E – Twitter mentions – Obama vs Romney over past seven days

Fig. D - Twitter mentions – Obama vs Romney over past seven days

Figure E shows the amount of Tweets that each candidate has garnished over the past seven days. Obama has over 100’000 more mentions over the past seven days than Romney.

If we however look at the swing states over the last month then it’s been neck and neck with Romney leading Obama at times. Figure E shows the last 30 days.

Fig. F – Past 30 days Twitter mentions – Obama vs Romney

Fig. F – Past 30 days Twitter mentions – Obama vs Romney

Over the past 30 days, Obama has 150’000 more mentions than Romney, 100’000 of which as we’ve already found, that have occurred in the past seven days.

Who has the most influence?

We also took a look at the most retweeted tweets over the past seven days. Figure G is the top influential tweets over the last week. All 10 (Which to remind you again are sourced from the Swing States) endorse Obama.

Fig. G – Most retweeted tweets in relation to Obama and Romney

Fig. G – Most retweeted tweets in relation to Obama and Romney

Mr Obama also has had a 3% mark up on Romney for influential accounts who mention the ‘Obama’ term. That number funnily enough is estimated to be the figure Obama needs to win the election with comfort.

So who will win based on all this this? Well commentators have been saying whoever can come out of Hurricane Sandy with the momentum will have the edge on the election.

Hurricane Sandy hit the United States on the 29th of October . What we’ve found is that Obama started edging Romney in mentions in the swing states on the 29th of October.

There are no figures to back it up, but it may be that the fourth most expensive storm in US history could have saved Obama his job.

Now before we get ahead of ourselves, all of the above is a mixture of data analysis across Twitter and our own analytical commentary. We’re believe that the demographic most likely to vote for Obama is more likely to be using Twitter. We also know that Obama has more celebrity backed public endorsements, which by its nature leads to more influence on sites like Twitter.

With all that said though we also think that the direct change after Hurricane Sandy and the momentum leading into the polls from it will give the election result to Obama.

Our Predictions

Modest prediction:
Barack Obama to win

Bold Prediction:
We think that Obama will win with over 300 electoral votes but no higher than 310

If we get this we’re taking a week off work prediction:
Obama to win with 307 electoral votes.

Luca Massaro

Luca Massaro

Director, We Play

We are in the middle of a revolution. While it may not feel like it, the world is changing rapidly and the way in which we communicate with our customers has evolved. Where some brands have found success in social media by leveraging relationships and driving significant value, others have achieved nothing but headaches. It is my company We Play's job, to bridge the gap between brands and fans and commercialise the relationships in which we create. 

See Full Profile >

Comments

PaulChaloner
Posted on November 6th 2012 at 10:47AM

Wow, erm, where to start.


First up, this statement "in the history books when they come to write down the name of the President of the United States of America 2012" is odd. The president of the USA in 2012 is and will be Obama, nothing can change that. The next president takes office in 2013, not 2012.


Secondly, this statement "In 2008 the year that Romney one his first term" Errrrmmm, yeah, so it was Obama's first term, not Romney's (he's the challenger remember?) and it's "won" not "one".

I realise this is all a little picky, but I didn't read the rest of the piece because of these cataclysmic errors at the start lost all credibility in the author, sorry.

Luca Massaro
Posted on November 7th 2012 at 9:55AM

Thanks for the comments Paul.

It's unfortunate because we submitted the article to SMT with errors in, but changed them before it was supposed to be published. The article got published with the errors in and not sure at what time SMT updated it, but clearly some damage was done.

Secondly, in response to your twitter comment 'Read the worst put together twitter analysis of the US election', I am not sure how you define this as the worst put together twitter analysis when you clearly state that you didn't read the rest of the piece because of the errors at the beginning? 

The idea is to use the data from twitter to see if it's possible to predict outcomes. It's not Harvard research no, but it's testing the water to use the analysis of the social web in a way that few are doing.

We specialise in sport and predominantly, sports fan behaviour. We used this method recently in the Premier League to define which clubs have the happiest fan bases. You can view that here http://weplay.co/which-premier-league-team-has-the-happiest-fan-base/

If that's the worst kind of analysis you have ever seen also please do let me know.

It was my idea to get one of our team to create something similar around the election to see if you can take twitter reactions to define outcomes. The idea came about on Monday and was released on Tuesday. Quick turnaround times means that we had some grammatical errors and didn't spend as much time as we should have proofing the documents, but as a startup, we are in this game to be proactive, not reactive and will learn from our grammatical errors.

Im not sure if in all your time working in gaming and technology Paul, you have created your own company from scratch in a hugely competitive market? But it sometimes means, to get the awareness you need, you have to move quicker than your opponents. We take these kind of risks and try to rock the boat in an attempt to get noticed.

Sometimes in doing so, we make mistakes. We are all human after all.

Luca

@iamluca

PaulChaloner
Posted on November 7th 2012 at 10:05AM

Appreciate the response Luca.


I didn't define the comment I made on Twitter, it was purely based on the last part of my comment. If you want credibility in this field, the least you can do is get the facts right at the start of a piece you are promoting your business around. They were cataclysmic errors, not just grammar and due to that I didn't read the rest of the piece, which may have contained excellent study.


But that is my point. You will lose people early on if the simple things are incorrect, hence my post.

I wouldn't take too much stock on my Twitter rant, that was just limitation of charachters. The main issue is credibility. In other words, if you don't even know that it was Obama's first term and not Romney's and how to spell "won" and not "one" then how do you expect anyone to take the rest of the piece seriously?

And yes, I've started a succesful tech company up 5 years ago, I know how hard it is but I didn't comit commercial suicide by creating a post riddled with errors that made my company look like chumps.

Sorry to be harsh, but it's just honest feedback. Your study may well be really good, but if you've lost all credibility before people get through it, it's sort of a waste of time.

As I said, thanks for the reply, it's good of you to do that at least and yes we are all human, but proof reading work before it goes on to a guest blog representing your company is very basic good marketing. Best of luck with the company.

Amit Singh
Posted on November 7th 2012 at 11:44AM

Excellent article, and timely subject matter. As an Analyst, I realize that social media analytics is the future of Predictive Analytics in many ways. And since I am writing this the day after the election, I am even more impressed at the results from this analysis you put together. Thank you.