Link Search Menu Expand Document (external link)

How to use this API in R

This sample code gets smoothed covid data for France between 11/15/2020 and 11/30/2020.


# add url
path <- ""

# request data from api
request <- GET(url = path)

# make sure the content is encoded with 'UTF-8'
response <- content(request, as = "text", encoding = "UTF-8")

# now we have a dataframe for use!
coviddata <- fromJSON(response, flatten = TRUE) %>% data.frame()