Introduction

This document is exploring tweets both from and about Starbucks and DunkinDonuts, two bitter rivals in the consumer coffee industry. There are different datasets collected for each of three question listed below. I like coffee a lot and drink it most days, and I go to both of these places so I was curious to see how the two compare on Twitter. For whatever reason, I keep on getting errors, so I am going to publish what the code would look like.

Question 1

Is Starbucks or Dunkin mentioned more in recent tweets? This is interesting to me because it will give a window into who is more popular on Twitter. While this only encompasses recent tweets, it may tell us who has been more popular online over the Covid time. For this, I will be collecting the ost recent 200 tweets that contain either Starbucks or Dunkin in it, and then running an analysis so see which was mentioned more often.

# import the csv
#Starbucks_Dunkin <- read.csv("https://myxavier-my.sharepoint.com/:x:/g/personal/ackermannk1_xavier_edu/EXrpQKDlu9VJrU2aNj9X1b0BVH2dXjmsQNHkBRLqiQIzJA?e=Dl9KOc")

#analysis
# sqldf("SELECT count(text) FROM Starbucks_Dunkin WHERE text LIKE %starbucks%") 
# sqldf("SELECT count(text) FROM Starbucks_Dunkin WHERE text LIKE %dunkin%")
# recievint the following error on the sql: "Error: tinyformat: Too many conversation specifiers in format string

Looking at this, we can see that Starbucks has been metioned more often than DUnkin.

Question 2

Which companies current hashtags are the most popular right now? This question is interesting to me, because a lot of times hashtags on Twitter are playing into some type of social media marketing campagin by the brand, so I want to see if either of these brands are doing that and if it is helping one be talked about more on Twitter. For this, i’ll be colecting two data sets, one od the 200 most recent Dunkin Tweets, and one of the ost recent Starbucks tweets, and then seeing which hashtags are liked and retweeted the most.

# Import the csvs
#Dunkin_Hashtags <- read.csv("https://myxavier-my.sharepoint.com/:x:/g/personal/ackermannk1_xavier_edu/EU9fOIBEw0ZDkV0lIS57g88BLl1Jv1gQqZse0f3lTT-KfQ?e=C3V107")
#Starbucks_Hashtags <- read.csv("https://myxavier-my.sharepoint.com/:x:/g/personal/ackermannk1_xavier_edu/Ecbt05gUcNBHnFstuE4vQDsBPViUoSvgYtdWJOLP2QL5Gg?e=baqTIW")

# Analysis

#count(Starbucks_Hashtags, favorite_count)
#mean(Starbucks_Hashtags$favorite_count)
#count(Starbucks_Hashtags, retweet_count)
#mean(Starbucks_Hashtags$retweet_count)

#count(Dunkin_Hashtags, favorite_count)
#mean(Dunkin_Hashtags$favorite_count)
#count(Dunkin_Hashtags, retweet_count)
#mean(Dunkin_Hashtags$retweet_count)

Based on the results, the DUnkin hashtag has an average favorite count of 3.3, whereas the Starbucks hashtag has an average favorite count of .79. Based on the last two analysis, while Starbucks may have more tweets coming out about them, DUnkin is getting more engagement in these tweets. The two hashtags are closer together in numbers when looking at the retweets.

Question 3

For this last question, I want to know which account, Starbucks or DUnkindonuts, is getting more favorites and retweets This is interesting to look at to see which account has more engagement. Starbucks has by far more followers, but does this translate into engagement? For this analysis, I will be gathering two data sets, the last 100 tweets from both Starbucks and DUnkin, and seeing which is getting more favorites and retweets.

# import the Starbucks.csv and Dunkin.csv
#Starbucks_tweets <- read.csv("https://myxavier-my.sharepoint.com/:x:/g/personal/ackermannk1_xavier_edu/Ef2oW2Phq2RFhhKsXy0YKygB_BjKmjQvk55h14_L4pFSfw?e=nl5rke")
#Dunkin_tweets <- read.csv("https://myxavier-my.sharepoint.com/:x:/g/personal/ackermannk1_xavier_edu/EbkZsHtAvCJJi-SrYqHAk8sBOdDCDGeYu-pia1QK3e6RBQ?e=y529au")

#Analysis
#count(Starbucks_tweets, favorite_count)
#mean(Starbucks_tweets$favorite_count)
#count(Starbucks_tweets, retweet_count)
#mean(Starbucks_tweets$retweet_count)

#mean(Dunkin_tweets$favorite_count)
#count(Dunkin_tweets, favorite_count)
#count(Dunkin_tweets, retweet_count)
#mean(Dunkin_tweets$retweet_count)

When it comes to favorites, Starbucks has many more favorites, and their average is almost double as well. Looking at retweets, Starbucks blows Dunkin out of the water, however, this is partly because of one tweet being retweeted way more than all the others by Starbucks so this dataset happens to be skewed. Starbucks is still getting more retweets, but I wouldn’t call this dataset reliable.