Over the last few years politicians have shown an increasing presence on Twitter, presumably as the platform provides the means to them to connect to their communities and voters in a direct way. As the election race draws to a conclusion, we thought it would be interesting to have a closer look at tweets coming from UK MPs to see if we can uncover certain themes and keywords that have defined the political language during the last few weeks.
To do this, we built a classifier system that is able to discriminate between Labour and Conservative MPs with very high accuracy (95%) based on certain keywords appearing in the tweets.
What we’ve found
We’ve discovered a high uniformity of message within tweets from Conservative and Labour MPs, and divergent messages between them. The tweets by Liberal Democrats fall somewhere between the two.
In the figure below we show the keywords most useful to the classifier in discriminating between the two parties. The size of each rectangle with a white outline is proportional to the appearance of the keyword in MPs’ tweets. Within each rectangle, the use by Labour or Conservative is proportional to the area shaded with the respective party colours. This treemap visualisation enables us to see both the frequency of keyword use in total and within each party

Figure One- Labour to Conservative Keyword Treemap


Looking at the messages from both parties, the economy has dominated the MPs’ posts on Twitter, with Labour choosing to focus on aspects of the economy with negative sentiment such as austerity, cuts, crisis and end. It’s interesting to see they also focused on the calls to arms by urging people to vote and register. Labour also tends to mention David Cameron and Tories’ policies.
Meanwhile, Conservatives focused on decreasing unemployment and the business environment (using keywords such as business, jobs, taxes, economy, income, unemployment) which has been on a growth trajectory according to their tweets. They also tend to highlight the chaos of any coalitions not involving themselves. Taxation also occurs quite frequently in tweets from the Conservatives.
We also analysed tweets by 44 Liberal Democrat MPs to see if they would be predicted as Labour or Conservative. Perhaps surprisingly, there was an almost 50-50 split (21 where classified as Conservative and 22 as Labour). They seem to use a more diverse keyword set, perhaps due to the role they play in the current coalition.
We only have a day to wait to find out which of these keywords resonated with the British voters!