Assignment 5: Simple Sentiment Analysis

Q1: Does Elon Musk receive more negative attention on twitter than Jeff Bezos?

I intend to collect Tweets mentioning Musk’s and Bezos’s twitter handles to evaluate the sentiment about what people are saying. This data, when paired with sentiment, will yield whether one receives more negative attention on average than the other.

Examining this data, we can tell that the average sentiment for Elon Musk is ~-.04, indicating that it is slightly negative but negligible out of a maximum of 5 and minimum of -5. The average sentiment for Jeff Bezos is ~1.2, placing him relatively much higher in comparison

Q2: What is the most common emotion conveyed in a tweet mentioning Elon Musk?

I intend to collect tweets mentioning Musk’s twitter handle to evaluate the emotional sentiment of what people are saying. This data, when paired with NRC emotive lexicon, will yield what emotion is most common, and if the overall sentiment is more positively or negatively fueled.

Examining this data, we can see that at a base level, there are more positive than negative emotions conveyed. Trust follows next as the first descriptive emotion, tailed by anticipation, joy, and anger.

Q3: How does aggregate sentiment in Shakespeare’s Hamlet vary by page, throughout the book?

I intend to collect all pages and words written in Shakespeare’s Hamlet to evaluate the book’s positive and negative sentiment as the progress. This data, when paired with afinn’s word sentiment, will yield how the book trends as it progresses and whether it is overall more negative or positive.

Examining this data, we can see that there does not appear to be a significant trend in sentiment as the book progresses. Though that’s not to say that there is no trend at all. The story itself starts off in a negative manner (represented as ~-.1) then slowly trends up till around 1/3 of the way through, before once again tending down again.