- Sign up to be CTLR tutors for MATH 116 and all things R! Contact Jeanne Albert at CTLR.
- HW-03 Discussion:
- Slides: Introducing Application Programming Interfaces (API’s) and mining tweets with
- In-class exercise:
- Packages to install:
twitteR package from RStudio (homepage is here)
- Create a Twitter account if you don’t already have one.
- Create a Twitter application at the Twitter Application Management
page by clicking “Create New App”. Give it whatever
name, description, and use https://rudeboybert.github.io/MATH216/ as the
- Click the “Keys and Access Tokens” tab
- Note your “API key”, “API secret”
- Click on “Create my access token” button below and note your “Access Token”, and “Access Token Secret”.
- Replace the four values below with the values in your “Keys and Access Tokens”
page and run (no spaces or line breaks). Indicate yes to the prompt: “Use a local file to cache
OAuth access credentials between R sessions?”
"Access token secret"
some_tweets <- searchTwitter("election", n=100, lang="en")