Albert Y. Kim
Friday 2016/04/22
What is the most important thing to keep in mind when observing such maps?
Strong selection biases at every step:
i.e. the sample is non-random, so it is not representative of the population as a whole, and hence the results of the sample are not generalizable to the entire US population.
Wikipedia: In computer programming, an application programming interface (API) is a set of routines, protocols, and tools for building software and applications.
So for example, if you want to build an App that uses Google Maps, Twitter, FB, Instagram etc. data, you access their data via an API.
Wikipedia: An API key is a code passed in by computer programs calling an API to identify the calling program, its developer, or its user to the Web site.
API keys are used to track and control how the API is being used, for example to prevent malicious use or abuse of the API.
We are getting digital permission to open the Twitter pipeline for our use, just like any other developer would.
twitteR package from RStudio (homepage is
here)Do not share these values with anyone nor save them in a publicly viewable file.
library(twitteR)
setup_twitter_oauth(
"API key",
"API secret",
"Access token",
"Access token secret"
)
some_tweets <- searchTwitter("prince", n=100, lang="en")