Before we Start
|
This course builds on previous courses and is not suitable for absolute beginners.
We begin by accessing an API using lowlevel methods, and end by applying them on another API.
|
What is an API?
|
Getting data from an API is equivalent to requesting a webpage
GET requests specify what data we want to retrieve in the URL
POST requests specify what data we want to retrieve in the body of the request.
Both requests have headers that we can manipulate to get what we want.
|
GETting data
|
200 is the internet code for everything is OK
GET requests can be adjusted to specify desired result
Dad jokes are not really that good.
|
Using POST
|
POST requests to servers put specific demands on how we request data
Using an API requires us to understand (some of) the ways the API works
Different searches typically requires different endpoints
|
What about danstat?
|
|
Time
|
|
Data Visualisation with ggplot2
|
ggplot2 is a flexible and useful tool for creating plots in R.
The data set and coordinate system can be defined using the ggplot function.
Additional layers, including geoms, are added using the + operator.
Boxplots are useful for visualizing the distribution of a continuous variable.
Barplots are useful for visualizing categorical data.
Faceting allows you to generate multiple plots based on a categorical variable.
|
Whats next?
|
|
{:auto_ids}
API
: Application Programming Interface
key word 2
: explanation 2