Retrieving tweets from R community 

Twitter has a web API that can be used to retrieve text (tweets) from it. A package named rtweet provides an interface to use it. Once we get used to it, it is very easy to scrape tweets. In this section, we are going to use rtweet to check what packages the R community tweet about, specifically which packages they talk about that most so that we can see whether we know about them. Make sure that rtweet is properly installed with the following code line:

if(!require(rtweet)){install.packages('rtweet')}

Using the rtweet package, along with some others that might aid us in the data cleaning process, we will count how many times R packages were mentioned using the rstats hashtag over 15,000 tweets. Besides internet connection, the proper use of rtweet also demands an authorization token and consequently a Twitter account. Most of the code will be reproducible at some level, but you need to set a token and an application for yourself.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.67.195