Logo

Live Election Mood Analysis

Live Analysis using Machine Learning of tweets relating to the upcoming general election in the UK.

This site was created as an experiment in Twitter sentiment analysis. The width of each party's section corresponds to the relative strength of the sentiment on Twitter. The Positive/Negative labels denote the polarity of the sentiment itself. The sentiment analysis is carried out using machine learning classifier tool NLTK and VADER. The tweets are collated live using a Twitter API stream and a predefined set of search terms designed to encompass as many of the tweets relating to the election as possible. The results are only based on the tweets posted in the last few seconds, hence the sometimes dramatic variation that you may see. I calculate some moving averages to smooth this out a bit, but in general it would be too boring to only update the values at a slower rate, and the idea is to get an instantaneous idea of what's going on (for TV debates etc.)