Last active
August 5, 2020 22:06
-
-
Save dmhowcroft/207001534da8363053110af39f7664fc to your computer and use it in GitHub Desktop.
Implements the solution described in this issue https://github.com/publichealthengland/coronavirus-dashboard-api-python-sdk/issues/3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is based on https://github.com/publichealthengland/coronavirus-dashboard-api-python-sdk/issues/3 | |
library("reticulate") | |
pybuiltins <- import_builtins() | |
cov19 <- import("uk_covid19") | |
api <- cov19$Cov19API(filters=list('areaType=ltla'), | |
structure = list("areaType"= "areaType", | |
"areaName"= "areaName", | |
"areaCode"= "areaCode", | |
"specimenDate"= "date", | |
"dailyLabConfirmedCases"= "newCasesBySpecimenDate", | |
"totalLabConfirmedCases"= "cumCasesBySpecimenDate")) | |
csv_from_api <- api$get_csv() | |
data <- read.csv(text=csv_from_api) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment