Discovering Data
  • Home
  • Blog

Trump's tweets - sentiment analysis

12/27/2016

0 Comments

 
Democrats have often criticised Trump for being negative and failing to provide hope. I wanted to test this by doing sentiment analysis on Trumps tweets since being elected. Then comparing that to his pre-election tweets. As always the code I used is in my code blog, here.

Analysis of Trump's pre election tweets

total positive tweets = 196 (12%)
total neutral tweets = 1330 (79%)
total negative tweets = 150 (9%)

More than 3 out of 4 are neutral. And the majority of the non neutral tweets are positive.

Analysis of Trumps' post election tweets

total positive tweets = 95 (34%)
total neutral tweets = 135 (48%)
total negative tweets = 49 (18%)

So almost half are neutral, one in 3 are positive and less than one in five are negative. The sample size for post election tweets is smaller but both data sets are in some agreement - the majority of tweets are neutral and positive tweets out-number negative tweets.

In the code blog I explain the technical aspects of this analysis and some of the potential weaknesses in the approach. In a future post I will describe an alternative approach using machine learning.

In conclusion I don't agree with commentators who claim Trump's message is mostly negative at least not on his twitter account. If anything his message has a neutral sentiment. However I think this approach to sentiment analysis is a little simplistic becuase it fails to consider the individual words in the context of the whole tweet.
0 Comments



Leave a Reply.

    Archives

    June 2018
    December 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blog