covidregionaldata
covidregionaldata: Subnational data for COVID-19 epidemiology - Published in JOSS (2021)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
5 of 28 committers (17.9%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Repository
An interface to subnational and national level COVID-19 data. For all countries supported, this includes a daily time-series of cases. Wherever available we also provide data on deaths, hospitalisations, and tests. National level data is also supported using a range of data sources as well as linelist data and links to intervention data sets.
Basic Info
- Host: GitHub
- Owner: epiforecasts
- License: other
- Language: R
- Default Branch: master
- Homepage: https://epiforecasts.io/covidregionaldata/
- Size: 88.6 MB
Statistics
- Stars: 37
- Watchers: 8
- Forks: 16
- Open Issues: 10
- Releases: 11
Topics
Metadata Files
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# Subnational data for the COVID-19 outbreak
[](https://github.com/epiforecasts/covidregionaldata/actions) [](https://app.codecov.io/gh/epiforecasts/covidregionaldata?branch=master) [](https://epiforecasts.io/covidregionaldata/articles/supported-countries.html) [](https://cran.r-project.org/package=covidregionaldata)
[](https://github.com/epiforecasts/covidregionaldata/blob/master/LICENSE.md/) [](https://github.com/epiforecasts/covidregionaldata/graphs/contributors) [](https://makeapullrequest.com/) [](https://GitHub.com/epiforecasts/covidregionaldata/commit/master/)
[](https://doi.org/10.21105/joss.03290) [](https://zenodo.org/badge/latestdoi/271601189)
Interface to subnational and national level COVID-19 data sourced from both official sources, such as Public Health England in the UK, and from other COVID-19 data collections, including the World Health Organisation (WHO), European Centre for Disease Prevention and Control (ECDC), John Hopkins University (JHU), Google Open Data and others. This package is designed to streamline COVID-19 data extraction, cleaning, and processing from a range of data sources in an open and transparent way. This allows users to inspect and scrutinise the data, and tools used to process it, at every step. For all countries supported, data includes a daily time-series of cases and, wherever available, data on deaths, hospitalisations, and tests. National level data is also supported using a range of data sources.
## Installation
Install from CRAN:
```{r, eval = FALSE}
install.packages("covidregionaldata")
```
Install the stable development version of the package with:
```{r, eval = FALSE}
install.packages("covidregionaldata",
repos = "https://epiforecasts.r-universe.dev"
)
```
Install the unstable development version of the package with:
```{r, eval = FALSE}
remotes::install_github("epiforecasts/covidregionaldata")
```
## Quick start
[](https://epiforecasts.io/covidregionaldata/)
Load `covidregionaldata`, `dplyr`, `scales`, and `ggplot2` (all used in this quick start),
```{r, message = FALSE}
library(covidregionaldata)
library(dplyr)
library(ggplot2)
library(scales)
```
### Setup data caching
This package can optionally use a data cache from `memoise` to locally cache downloads. This can be enabled using the following (this will use the temporary directory by default),
```{r}
start_using_memoise()
```
To stop using `memoise` use,
```{r, eval = FALSE}
stop_using_memoise()
```
and to reset the cache (required to download new data),
```{r, eval = FALSE}
reset_cache()
```
### National data
To get worldwide time-series data by country (sourced from the World Health Organisation (WHO) by default but also optionally from the European Centre for Disease Control (ECDC), John Hopkins University, or the Google COVID-19 open data project), use:
```{r}
nots <- get_national_data()
nots
```
This can also be filtered for a country of interest,
```{r}
g7 <- c(
"United States", "United Kingdom", "France", "Germany",
"Italy", "Canada", "Japan"
)
g7_nots <- get_national_data(countries = g7, verbose = FALSE)
```
Using this data we can compare case information between countries, for example here is the number of deaths over time for each country in the G7:
```{r g7_plot, warning = FALSE, message = FALSE}
g7_nots %>%
ggplot() +
aes(x = date, y = deaths_new, col = country) +
geom_line(alpha = 0.4) +
labs(x = "Date", y = "Reported Covid-19 deaths") +
scale_y_continuous(labels = comma) +
theme_minimal() +
theme(legend.position = "top") +
guides(col = guide_legend(title = "Country"))
```
### Subnational data
To get time-series data for subnational regions of a specific country, for example by level 1 region in the UK, use:
```{r}
uk_nots <- get_regional_data(country = "UK", verbose = FALSE)
uk_nots
```
Now we have the data we can create plots, for example the time-series of the number of cases for each region:
```{r uk_plot, warning = FALSE, message = FALSE}
uk_nots %>%
filter(!(region %in% "England")) %>%
ggplot() +
aes(x = date, y = cases_new, col = region) +
geom_line(alpha = 0.4) +
labs(x = "Date", y = "Reported Covid-19 cases") +
scale_y_continuous(labels = comma) +
theme_minimal() +
theme(legend.position = "top") +
guides(col = guide_legend(title = "Region"))
```
See `get_available_datasets()` for supported regions and subregional levels.
To view what datasets we currently have subnational data for, along with their current status, check the
[supported countries](https://epiforecasts.io/covidregionaldata/articles/supported-countries.html) page
or build the [supported countries vignette](vignettes/supported-countries.Rmd).
For further examples see the [quick start vignette](https://github.com/epiforecasts/covidregionaldata/blob/master/vignettes/quickstart.Rmd). Additional subnational data are supported via the `JHU()` and `Google()` classes. Use the `available_regions()` method once these data have been downloaded and cleaned (see their examples) for subnational data they internally support.
## Citation
If using `covidregionaldata` in your work please consider citing it using the following,
```{r, echo = FALSE}
citation("covidregionaldata")
```
## Development
[](https://github.com/epiforecasts/covidregionaldata/wiki/)
This package is the result of work from a number of contributors (see contributors list [here](https://epiforecasts.io/covidregionaldata/authors.html)). We would like to thank the [CMMID COVID-19 working group
](https://cmmid.github.io/groups/ncov-group.html) for insightful comments and feedback.
We welcome contributions and new contributors! We particularly appreciate help adding new data sources for countries at sub-national level, or work on priority problems in the [issues](https://github.com/epiforecasts/covidregionaldata/issues). Please check and add to the issues, and/or add a [pull request](https://github.com/epiforecasts/covidregionaldata/pulls). For more details, start with the [contributing guide](https://github.com/epiforecasts/covidregionaldata/wiki/Contributing). For details of the steps required to add support for a dataset see the [adding data guide](https://github.com/epiforecasts/covidregionaldata/wiki/Adding-Data).
Owner
- Name: Epiforecasts
- Login: epiforecasts
- Kind: organization
- Email: sebastian.funk@lshtm.ac.uk
- Location: London
- Website: https://epiforecasts.io
- Twitter: sbfnk
- Repositories: 56
- Profile: https://github.com/epiforecasts
Researchers at the London School of Hygiene & Tropical Medicine doing research to forecast infectious diseases and perform real-time analyses.
JOSS Publication
covidregionaldata: Subnational data for COVID-19 epidemiology
Authors
Centre for Mathematical Modelling of Infectious Diseases, London School of Hygiene & Tropical Medicine
None
Tessella
Centre for Mathematical Modelling of Infectious Diseases, London School of Hygiene & Tropical Medicine
Centre for Mathematical Modelling of Infectious Diseases, London School of Hygiene & Tropical Medicine
Centre for Mathematical Modelling of Infectious Diseases, London School of Hygiene & Tropical Medicine
Tags
COVID-19 Open data rstats Sars-Cov-2GitHub Events
Total
Last Year
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Sam Abbott | s****2@g****m | 523 |
| Joe | p****2@h****k | 339 |
| kathsherratt | k****t@l****k | 180 |
| Richard Martin-Nielsen | r****n@a****a | 109 |
| Jonnie Bevan | j****n@t****m | 76 |
| Hamish Gibbs | h****s@H****n | 40 |
| Hugo Gruson | h****n@p****m | 36 |
| Joel Hellewell | j****4@i****k | 28 |
| seabbs | s****t@g****m | 8 |
| Sebastian Funk | s****k@l****k | 8 |
| kathsherratt | k****t@g****m | 6 |
| Paul Campbell | p****1@g****m | 6 |
| ffinger | 1****r | 6 |
| biocyberman | b****n@g****m | 5 |
| jhellewell14 | l****2@l****k | 5 |
| Richard Boyes | r****s@g****m | 4 |
| Vang Le-Quy | v****y@v****1 | 4 |
| patrickbarks | p****s@g****m | 3 |
| Maria | 3****d | 2 |
| Pietro Monticone | 3****e | 2 |
| seabbs | s****2@g****m | 2 |
| Arfon Smith | a****n | 1 |
| Charlotte Soneson | c****n@g****m | 1 |
| DavisVaughan | d****s@r****m | 1 |
| Haze Lee | h****e@r****e | 1 |
| Tri Luu | i****r | 1 |
| joeHickson | j****n | 1 |
| sophiemeakin | s****n@o****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 39
- Total pull requests: 61
- Average time to close issues: about 1 month
- Average time to close pull requests: 13 days
- Total issue authors: 10
- Total pull request authors: 12
- Average comments per issue: 3.05
- Average comments per pull request: 2.48
- Merged pull requests: 51
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- seabbs (17)
- RichardMN (9)
- joseph-palmer (3)
- Bisaloo (3)
- sbfnk (2)
- bquilty25 (1)
- glenviewjeff (1)
- InterdisciplinaryPhysicsTeam (1)
- biocyberman (1)
- eguidotti (1)
Pull Request Authors
- RichardMN (22)
- seabbs (12)
- Bisaloo (11)
- joseph-palmer (7)
- sbfnk (2)
- trilwu (1)
- kathsherratt (1)
- pitmonticone (1)
- arfon (1)
- csoneson (1)
- DavisVaughan (1)
- biocyberman (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- R >= 3.5.0 depends
- R6 * imports
- countrycode >= 1.2.0 imports
- dplyr * imports
- httr * imports
- jsonlite * imports
- lifecycle * imports
- lubridate * imports
- memoise * imports
- purrr * imports
- readxl * imports
- rlang * imports
- stringr * imports
- tidyr >= 1.0.0 imports
- tidyselect * imports
- vroom * imports
- xml2 * imports
- RSocrata * suggests
- ggplot2 * suggests
- ggspatial * suggests
- knitr * suggests
- mockery * suggests
- rmarkdown * suggests
- rvest * suggests
- rworldmap * suggests
- sf * suggests
- spelling * suggests
- testthat >= 3.0.0 suggests
- usethis * suggests
- actions/checkout v2 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- docker/build-push-action v2 composite
- docker/login-action v1 composite
- docker/metadata-action v2 composite
- n1hility/cancel-previous-runs v2 composite
- actions/first-interaction v1 composite
- actions/checkout v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- n1hility/cancel-previous-runs v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/github-script v3 composite
- actions/checkout v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/stale v3 composite
- actions/checkout v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-r v1 composite
- r-lib/actions/setup-r-dependencies v2 composite
- rocker/verse ${VARIANT} build