The money-time of the Israeli election day as seen by Twitter

(warning, the data did not play well with me)

Election days in Israel climax at 10pm. In this precise time the three major broadcasting networks announce their polling results. These results tend to be quite accurate and give a good indication on the final results. The moments right before and after 10pm are extremely emotional for the people of Israel.

With these elections, held on March 17th, I decided to take a closer look at these crucial moments and how they are manifested in Twitter. I used the Twitter search API to pull tweets that were created between 9:55pm – 10:05pm and contained the word “Israel”.  I also used a service called Alchemy API to perform automatic sentiment analysis on these tweets.

In the following graph, each dot represents a tweet. the horizontal axis is time relative to 10pm and the vertical axis is sentiment between 1 to -1 where 1 is positive with high probability and -1 is negative with high probability.

Screen Shot 2015-03-18 at 2.56.33 AM

It’s pretty to hard to see anything from this chart besides the fact that it seems to be slightly more dense on the right side, suggesting that more tweets were tweeted after 10pm than before.

In an attempt to cleanup the results, I batched tweets in 30 seconds intervals and calculated the average for them. In this chart each dot marks a batch of tweets and the vertical axis is the average sentiment of the entire batch.

Screen Shot 2015-03-18 at 3.05.50 AM

Unfortunately, It’s still hard to identify a trend besides the fact that the average sentiment is negative – that’s usually a property of news stories.

As a last resort, I decided to only take a look at the quantities of tweets. These tweets don’t necessarily represent the entire twitter firehose of data but looking at the first chart, they might still provide an insight.

Screen Shot 2015-03-18 at 3.05.59 AM

Still no clear trend. However, the peak at 10:00pm which represent tweets between 10:00pm – 10:30pm does make a lot of sense – It’s right after the results.

That’s data science. Sometimes you get inspiring results and sometime you’re just wasting CPU cycles.


2 thoughts on “The money-time of the Israeli election day as seen by Twitter

  1. Hi Tomer, I like the idea of doing an analysis using public APIs (Twitter & Alchemy). If you could augment this app by listing some representative tweets (classified: neg and pos,) that would add to the story telling part of the analysis. In addition, you could color code sections of sentiment score timeline to indicate the differential.

Comments are closed.