This is an introduction to working with APIs in R, designed for participants with limited programming experience. It can be taught in 2 hours.
The lesson starts with covering the basics of API calls using GET and POST. It then explores
GET requests against a very simple API. It continues with POST requests to Statistics Denmark,
and concludes with a discussion of the package danstat as an alternative before offering
tools for working with some of the slightly exotic time formats returned by Statistics Denmark.
The lesson requires some prior knowledge of R and RStudio/Positron. Learners should have R and Positron (or RStudio) installed on their computers. They will also need to be able to install R packages from CRAN, create directories and download files. See the lesson website{target="_blank"} for instructions on installing R and Positron.
KUB Datalab{target="_blank"} is Copenhagen University Library{target="_blank"}'s center for working with data. Our primary focus is to support students at the University of Copenhagen{target="_blank"} in regards to theri work with data and digital methods.
