Introduction
All packages are installed and ready for use.
-rtweet will be used for interfacing R with Twitter.
-httpub will be used to authenticate over the internet.
-dplry allows for conclusions about the data to be made by assisting with dataset manipulation in a manner similar to SQL.
-tidyverse allows for the usage of ggplot, which can be used to create visualizations and graphs.
-rmarkdown and knitr allows for reporting
Defining the twitter token
The code required for the twitter token has been included. These will come from “apps.twitter.com”. The appname, key, and secret will then be assigned onjects into the twitter_token.
How has the number of tweets by White Claw compared to that of Bud Light changed since the COVID-19 outbreak began in the United States? This could provide some insight into if these drink companies are attempting to market more or less on twitter, now that there has been such a change in the market place from this pandemdic.
The data that I intend to collect for this analysis is the frequencies of tweets of White Claw in comparison to Bud Light since the Coronavirus pandemic.I plan to grab the first 100000 tweets by these companies, and I do plan on including retweets since I want to look simply at activity.
The last 10,000 most recent tweets by White Claw and Bud Light have been imported from Twitter and labeled under ‘drinks’ data set. 4531 observations were imported at the time the code was created.
The following visualization shows how the number of tweets by White Claw and Bud Light has changed by day since news of the Coronavirus first appeared. As you can see from the graph, Bud Light tweats more than White Claw by quite a considerable amount, with higher spikes of tweets appearing more frequently by Trump in recent months. In compairison, White Claw barely posts anything on twitter at all.
How does the mentions of White Claw vs. Bud Light vary since the Covid-19 outbreak began in the United States? I think this is an interesting next step to the first question, because there is a difference between how active a company is on their twitter account, and how popular they are with the public. Clearly, Bud Light is much more active on their twitter account; but does that mean that people talk about them more?
I plan to grab all tweets that mention ’white claw and bud light, not including retweets since I want to see people who specifically wanted to post about these products.
Data regarding White Claw has been imported under the name ‘whiteclaw’, while data regarding Bud Light has been imported under the name ‘budlight’.
What are the most popular tweeting locations for budlight and white claw? This is interesting, because it would tell decision makers at these companies where people are talking about their product the most, and where they could advertise more.
I will be using the same conditions and tweets that were used in step 2.2 and 2.3
#According to the code below, most people who are tweating about white claw are doing so from Los Angeles (20) while most people who are tweating about bud light according to the minimaly loaded budlight data is the Bryonx, NY, Floriday, and Manhattan (each with 2) which tells us that Budlight appears to have a bigger east cost presence while white claw has a bigger west cost presence. With this information, both companies could know to market to the areas where they are popular with, or if they want to branch out, they could market to areas where they aren’t as popular