Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/javierluraschi/covid

Novel Coronavirus(2019-nCoV) updates from WHO daily reports
https://github.com/javierluraschi/covid

2019-ncov coronavirus corvid corvid-2019 dataset rstats

Last synced: 3 days ago
JSON representation

Novel Coronavirus(2019-nCoV) updates from WHO daily reports

Awesome Lists containing this project

README

        

---
title: "COVID Updates"
output:
github_document:
fig_width: 9
fig_height: 4
---

This repo provides hourly updates from the [World Helath Organization](https://www.who.int/) [Coronavirus disease (COVID-2019) situation reports](https://www.who.int/emergencies/diseases/novel-coronavirus-2019/situation-reports/) in [CSV](https://github.com/javierluraschi/covid/tree/datasets) and [pins](https://pins.rstudio.com) format.

From R, you can query the list of available datasets as follows:

```{r}
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:

```{r}
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](https://github.com/javierluraschi/covid/tree/datasets), a cleaned up dataset can be found in other repos like [ramikrispin/coronavirus-csv](https://github.com/RamiKrispin/coronavirus-csv) and downloaded with pins as follows:

```{r}
covid <- pin("https://raw.githubusercontent.com/RamiKrispin/coronavirus-csv/master/coronavirus_dataset.csv") %>%
read.csv() %>% tibble::as_tibble() %>% print()
```

```{r}
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()
```