Friday, February 15, 2019

Politics of Emotion- Insights From Twitter Analysis


Use of emotion in harnessing support from the voters is not new to political arena. Newer technology and greater reach through social media enable politicians to connect with the voters more efficiently. However being mawkish didn't worked then it must not work now.
Objective of the analysis

To see if use of some emotion harness more support for a politician than other on tweeter.
To see if the popular emotion vary from politician to politician.

Methodology

Recent Tweets of 2 major politicians of India was downloaded
  1. Narendra Modi (1741)
  2. Rahul Gandhi (1434)
I cleaned the tweets for English words only and then we use NRC Lexicon dictionary to assess the emotion of every tweet. NRC dictionary give following emotion count in the tweet
  1. Positive Count
  2. Negative Count
  3. Joy Count
  4. Fear Count
  5. Sadness Count
  6. Anger Count
  7. Surprise Count
  8. Trust Count
We then calculate the ratio of every emotion in the Tweet using the formula given below
 
           Emotion (a) Ratio = (Emotion (a) Count)/ (Word Count in the Tweet)

For the likes Ratio for a Tweet we use the following formula:

           Likes Ratio = (Likes for the Tweet)/ (Total likes for sample Tweets)

After this I regress the result of Likes ratio and emotion ratio to understand that if Likes Ratio depends on any of the Emotion Ratio significantly for both the politicians

Results

Our analysis was able to establish positive relationship between likes on Narendra Modi Tweets and use of positive and fear sentiments.



Our analysis was able to establish positive relationship between likes of Rahul Gandhi Tweets and use of joy sentiments


So we can say that for both the leaders use of some emotions are more connecting than other and emotions vary according to leader. We hypothesize that there is relationship between perceived personality of a politician and popular emotion for him and further analysis can be done in this area.

CODE R
1.    To Download Tweets
politician <- get_timeline('politician Twitter handle', n = 2000) .
2.    To Clean Tweets
politician <- clean_tweets(politician)
3.    . For NRC Dictionary analysis
politician <- dictionary_count(politician)
***If you need detail code please share your email in the comment box