16.2 Mining Twitter Text Data using R

Twitter is one of the most popular social media platform for information sharing. Some examples from rforresearch tweets rforresearch?)

16.2.1 Obtaining Twitter Data

  • Twitter provides an API access for their data feed.

  • User is required to create an app and obtain access codes for the API.

  • See here https://cran.r-project.org/web/packages/rtweet/vignettes/auth.html for a detailed introduction on obtaining API credentials.

  • Data access is limited in various ways (days, size of data etc.).

  • See here https://developer.twitter.com/en/docs.html for full documentation.

  • R provides packages like twitteR and rtweet provide programming interface using R to access the data.

  • Twitter doesnt allow data sharing but the API setup is straight forward. Twitter does allow sharing of the tweet IDs (available in the data folder)