This repo provides hourly updates from the World Helath Organization Coronavirus disease (COVID-2019) situation reports in CSV and pins format.
From R, you can query the list of available datasets as follows:
library(pins) board_register_datatxt("https://raw.githubusercontent.com/javierluraschi/covid/datasets/data.txt", "covid") pin_find(board = "covid")
You can then retrieve specific tables from the daily reports as follows:
pin_get("covid-20200227-1", board = "covid")
Do notice that this dataset come straight from the PDF files, while the data is kept up-to-date by parsing it as soon as it's released, the headers still need to be cleaned up and some tables joined together.
The CSV files can be found under covid/tree/datasets, a cleaned up dataset can be found in other repos like ramikrispin/coronavirus-csv and downloaded with pins as follows:
covid <- pin("https://raw.githubusercontent.com/RamiKrispin/coronavirus-csv/master/coronavirus_dataset.csv") %>% read.csv() %>% tibble::as_tibble() %>% print()
library(dplyr, warn.conflicts = FALSE) library(ggplot2) filter(covid, type == "confirmed") %>% group_by(date) %>% summarise(confirmed = sum(cases)) %>% arrange(date) %>% mutate(date = as.Date(date), confirmed = cumsum(confirmed)) %>% ggplot(aes(x=date, y=confirmed)) + geom_line() + theme_light()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.