Did you know that 7 in 10 Americans drink coffee every week and 62% drink coffee every day, according to the National Coffee Association? Americans clearly have a thing for coffee. But which coffee chain is the favorite? This document will explore and compare the sentiment on Twitter around two national coffee brands, Starbucks and Dunkin’.
To complete the analysis, I will scrape data from Twitter to analyze 5,000 tweets with 90 variables for each Starbucks and Dunkin’. The tweets will allow me to determine the sentiment from Twitter users and customers of each brand.
I am not a particularly picky coffee-drinker. In most cases, I will pick up coffee from the coffee shop I’m closest to at the time. Lucky for me, there are multiple Starbucks and Dunkin’ locations within a few mile radius of my home and office. I’m curious to learn if there is one brand I should choose over another in the future in order to get the best customer experience possible.
In order to determine this, I collected tweets mentioning the words Starbucks and Dunkin’ to assess which coffee chain generally has most positive people communicating with and about them.
As you can see from the visualizations below, the number of positive and negative tweets are fairly even. Dunkin’ has 339 positive mentions and 602 negative mentions, while Starbucks has 344 positive mentions and 573 negative mentions. However, it appears that overall, Starbucks has a generally more positive sentiment around its brand.
Determining if customer sentiment on Twitter is more positive or negative at different times of the day will help me to determine what time is best or worst to stop in for a coffee.
In order to answer this question, I combined the tweets for both brands into one data frame and created a visualization to show the total sentiment (positive tweets - negative tweets) for each brand.
As you can see from the visualization below, overall sentiment is generally negative at most times of the day for both brands. However, sentiment is most negative for Starbucks around 5pm and most negative for Dunkin’ around 2pm, 6pm and 9pm. If I were planning a trip to either of these coffee shops, I would most likely want to avoid these times.
While sentiment is overall negative for both brands, it appears that it most positive (but still negative) for Starbucks around 10pm and sentiment is actually positive for Dunkin’ around 9am.
Now that we have seen that overall sentiment for Starbucks and Dunkin’ is somewhat even (although Starbucks has a slight edge), I’m curious to know which words contribute most positively and most negatively to the sentiment around each brand. This will help me understand more in depth why customers feel positively or negatively around both coffee shops. In order to determine this, I pulled the top words and their word counts associated with the positive or negative sentiment for both Starbucks and Dunkin’.
As you can see from the visualization below, the positive words that contribute most to Starbucks’ sentiment are love, free and hot. It makes sense that free and hot are both top words referring to coffee. The negative words that contribute most to the Starbucks sentiment are cold, fall and hate. The word cold could very likely be negative when referring to hot coffee, however these mentions could also be referring to cold brews, which have grown in popularity at Starbucks. Additionally, the word fall could be negative, but it could also be referring to the season fall, which would not necessarily be negative. One word that stands out as being different for Starbucks when compared to Dunkin’ is the positive word “swift”. This could imply that Starbucks has faster service than Dunkin’.
The top positive words for Dunkin’ are actually the same as Starbucks - love, free and hot. While the top negative words are shit, cold and bad. The curse words imply there is definitely some anger around their negative experiences. Additionally, one word that stands out as different for Dunkin’ when compared to Starbucks is the negative word “wrong”. This could imply that Dunkin’ gets orders wrong more often than Starbucks.
Overall, it appears that Starbucks has a more positive sentiment in general. Speed of service and correct orders are most important to me as a coffee drinker, so I would likely choose Starbucks over Dunkin’ when deciding where to purchase my coffee. However, I would definitely avoid going at 5pm.