Introduction

The point of this document is to demonstrate the results from my first time collecting data using the Twitter API. The functionality of using API through R allows the user to comb through the massive database of tweets constantly circulating Twitter. For this assignment, I chose to select tweets mentioning or tweeted by two competitve brands, Marriott-Bonvoy and Hilton hotel groups, in order to conduct a base-level comparative analysis of their prescences on social media.

I chose companies in the Hospitality, Travel & Leisure industry because people like to complain about inconviencnes within this industry a lot. This is probably due to most people feeling a sense of entitlement that accompanies their idea of relaxation, luxury spending, and vacation. Also, customer satisfaction and perception is the main driver of competition between companies in this industry.

Packages Required

The following packages are needed in order to run our analysis:

Httpuv

Allows R to connect and communicate with the internet to transfer information between the two.

Rtweet

Connects R to the Twitter API, giving us the ability connect tweets and tweet from an account.

Tidyverse

Gives us a bunch of analysis tools combined into one seamless package. Overall, this package allows us to manipulate, wrangle, and visualize data for its intended purpose.

Dplyr

This package gives us a lot of data wrangling capabilities in order to narrow down observations to create in-depth analyses

library(httpuv)
library(rtweet)
library(tidyverse)
library(stringr)

Gathering Data

I specifically searched for tweets from Marriott International’s and Hilton Hotels’ main twitter pages for their group of hotels, MarriottBonvoy and HiltonHotels. I originally had it set to comb data also mentioning just Hilton, but was receviing too many tweets regarding Paris Hilton and newly famous TikTok star, Perez Hilton. For consistency purposes, I also just searched for tweets mentioning MarriottBonvoy instead of just “Marriott”. This also sorted out tweets Bill Marriott’s ongoing public legal battle with his son, John Marriott.

Question 1

When tweeted by the actual account for each company, does MarriottBonvoy or HiltonHotels receive more likes on their tweets?

I thought this would be interesting since the two companies are direct competitiors, so comparing the relative activity of their followers on Twitter could potentially be a slight indicator of how loyal their customer-bases are.

In order to do this, I pulled 400 tweets mentioning or tweeted by each company. I purposely excluded retweets in order to trim results and get more tweets composed by the companies twitter pages. I then filtered for just the company screen-names and pulled the total sum of favorites for each account. The results are below.

MarriotBonvoy
## # A tibble: 1 x 1
##   `sum(favorite_count)`
##                   <dbl>
## 1                   143
HiltonHotels
## # A tibble: 1 x 1
##   `sum(favorite_count)`
##                   <dbl>
## 1                    11

To my surprise, there were not a lot of favorites for either companies for each having 100k+ followers. MarriottBonvoy had significantly more relative to HiltonHotels. This was a surprise considering Hilton has a lot more followers than Marriott (185k vs. 316k). This indicates that MarriottBonvoy’s page has a more loyal following, possibly due to higher levels of customer satisfaction with their brand and service.

Question 2

How many people in the data have responded directly to a tweet by MarriottBonvoy or HiltonHotels or mentioned them in their own tweet?

This question is an interesting question to further explore customers’ interaction and engagement with the two companies over social media. It may also provide some indication of the sentiment within the comments/posts made.

Similar to the last question, I pulled 400 tweets for each company and again excluded the retweets so more content-based tweets were pulled.

MarriotBonvoy
## # A tibble: 1 x 1
##       n
##   <int>
## 1    54
HiltonHotels
## # A tibble: 1 x 1
##       n
##   <int>
## 1    54

I was extremely surprised to find that both companies had 54 instances of replies and mentions. Since Marriott had more likes, I would have expected them to also have more instances of mentions/replies. In this case, it appears Hilton’s larger following on Twitter helped it catch up to Marriott’s seemingly more active followers.

Question 3

What percent of tweets were tweeted by the company versus people just mentioning or respondonding to the company?

I thought this last question would be interesting to consider purely from a data measurement standpoint. After the first question produced surpsingly low numbers for amount of favorites recevied for having hundreds of thousands of followers, I figured it would be worthwhile to understand just how many tweets by the company were present in the data.

Again, from the 400 tweets pulled for each company, I filtered for tweets purely by each company’s screen name, counted the amount of those instances, and divided it by count of 400 tweets I originally pulled.

MarriotBonvoy
##        n
## 1 0.0075
HiltonHotels
##      n
## 1 0.16

This analysis didn’t do anything to squash my surprise that Marriott had significantly more favorites despite having much less followers. With less than 1% of total tweets being made by the company’s page out of the 400, they still managed to gather a lot more favorites than Hilton’s 16%. This helped me draw the final conclusion that Marriott’s twitter following is a lot more positively dedicated than Hilton’s. Further analysis is needed to discern whether this corresponds to overall customer satisfaction.