I am going to do sentiment analysis between Starbucks and Dunkin. I will be scraping twitter data to do the analysis. I will also use some sentiment analysis tools to help in the determination of what words are positive and negative. I want to find out whether Starbucks or Dunkin has more positivity revolving around them on Twitter. I will scrape data from 5,000 tweets and then use that data to perform my analysis.
For this analysis I am only going to look at the tweets that have the word ‘Starbucks’ in the main text of the tweet. I will not include retweets. I also only want to look that the words that have been displayed 7 or more times from the data that I scraped from Twitter to get an understanding of how Starbucks is being portrayed on Twitter most often. From the chart we can see that Starbucks has more positive tweets overall than negative. There are more positive words showing up in the tweets that I collected for Starbucks rather than negative. I think it is important to note that the word ‘shit’ could be used in a positive sense. For example, “This coffee is the shit”!
For this analysis I am only going to look at the tweets that have the word ‘Dunkin’ in the main text of the tweet. I will not include retweets. I also only want to look that the words that have been displayed 7 or more times from the data that I scraped from Twitter to get an understanding of how Dunkin is being portrayed on Twitter most often.
As we can see from this chart, there is a mix of both positive and negative words. There are more positive words that are displayed in tweets more often than there are negative words displayed in tweets when the text includes the word ‘Dunkin’.
Note: There is obviously a difference in amount of positive/negative words between tweets that contain the word ‘Starbucks’ in them vs the word ’Dunkin”. I think it will be interesting to compare the two companies side by side.
For this analysis I am going to look at total word count grouped by either positive or negative sentiment and displayed for both Starbucks and Dunkin.
From this chart we can see that Starbucks has a lot more positive sentiment being shared about them on twitter. At the same time Dunkin has less negative being shared about them on twitter. I think it is important to look at the difference between the two and notice that there is a greater jump from negative to positive for Starbucks meaning that there is greater amount of positive than negative being shared versus Dunkin because the gap between positive and negative for Dunkin is closer together.
For this analysis I want to use the time aspect (when the tweet was created) to see how the sentiment changes over time between positive and negative for both Starbucks and Dunkin throughout the day. This time scale is roughly looking at 11am until about 6:30pm.
From this chart we can see the total number of positive vs negative words tweeted about Starbucks and Dunkin from around 11:00 am until 6:30 pm on Wednesday April, 26th 2022. There are some spikes in the number of words tweeted but I think it’s interesting so look at some of the red dips, meaning there was not that much positive sentiment being tweeted about either company around that time.