27 JUN

2023

API Training for Digital Health

In this session we will introduce you to APIs and what they can do, building up (with practical examples) to you writing your own API in R

Online
27 Jun 2023 2 p.m. — 4 p.m.

Please note that applying to this event through the registration form is not a guarantee of admission, and applicants will be alerted of their place by 20th June 2023. Please use your University emails to sign up to ensure eligibility for this event.

Application Programming Interfaces (APIs) are a way of making computer programs talk to each other in a standardised way. This could be getting information from a remote service (e.g. getting tweets from Twitter), or adding information to a remote service (e.g. upload a video to YouTube), or interacting with hardware (e.g. changing the temperature on your thermostat) as well as a host of other possibilities.

In this session we will introduce you to APIs and what they can do, building up (with practical examples) to you writing your own API in R using the plumber library.

Topics covered

  • What is an API?
  • Where are APIs used?
  • How can we use APIs in R?
  • The plumber framework.
  • Writing APIs with plumber in R.

Prerequisites

This session will be done entirely in RStudio using R libraries. You should be comfortable using R, but there is no need to be an expert!

To get the most out of the session you should make sure you have RStudio installed, and the R packages listed below:

  • httr
  • jsonlite
  • tidyverse
  • plumber
  • gapminder
  • png

Check each of these loads prior to the session by running e.g.

> library(httr)

Otherwise you may spend the session installing packages!

Return to event index