This package is now depreciated with development being moved to covidregionaldata
Note: This package makes extensive use of memoise
and writes a .cache
to the directory in which its functions are run. This speeds up data retrieval and avoids hitting rate limits but does not follow CRAN best practice. Use with care. The cache can be reset with reset_cache()
when updated data is required from the online source.
Install the development version of the package with:
remotes::install_github("epiforecasts/NCoVUtils")
There are two sources of worldwide, country-level data on cases and deaths.
NCoVUtils::get_who_cases(country = NULL, daily = TRUE))
A further function for worldwide data extracts non-pharmaceutical interventions by country:
And anonymised international patient linelist data can be imported and cleaned with:
We have several functions to extract sub-national level data by country. These are typically at the admin-1 level, the largest regions available. We are also working on joining the data to standard georeferencing codes to allow easy mapping.
Currently we include functions for sub-national data in the following countries:
Europe
Belgium
France
Germany
Italy
Spain
United Kingdom
Americas
Canada
United States
Eastern Mediterranean
Western Pacific
Korea
Japan
South-East Asia
Africa
We are working to improve and expand the package: please see the Issues and feel free to comment. We are keen to standardise geocoding (issues #81 and #84) and include data on priority countries (#72). As our capacity is limited, we would very much appreciate any help on these and welcome new pull requests.
Set your working directory to the home directory of this project (or use the provided Rstudio project). Install the analysis and all dependencies with:
remotes::install_github("epiforecasts/NCoVUtils", dependencies = TRUE)
This package is developed in a docker container based on the tidyverse docker image.
To build the docker image run (from the NCoVUtils
directory):
To run the docker image run:
The rstudio client can be found on port :8787 at your local machines ip. The default username:password is ncovutils:ncovutils, set the user with -e USER=username, and the password with - e PASSWORD=newpasswordhere. The default is to save the analysis files into the user directory.
To mount a folder (from your current working directory - here assumed to be tmp
) in the docker container to your local system use the following in the above docker run command (as given mounts the whole ncovutils
directory to tmp
).
{bash, eval = FALSE} --mount type=bind,source=$(pwd)/tmp,target=/home/ncovutils
To access the command line run the following:
{bash, eval = FALSE} docker exec -ti ncovutils bash
Alternatively the package environment can be accessed via binder.