3.1 Data preparation: assemble_data.Rmd

This report downloads the data and pre-processes it to enable further analyses.

3.1.1 Inputs

The package phifunc is used to download publicly-available, national COVID-19 data, and to do some of the pre-processing. Unfortunately, this package uses WHO internal APIs for some of these tasks and cannot be made publicly available without exposing these APIs, which would be a security breach. As a result, the package can only be installed with an authentication token, which needs to be stored in a file called phifunc_token at the root of the project folder.

3.1.2 Outputs

The main output of the report is a clean data file containing data for all countries named final_dat_[date].rds, a copy of which will be stored in the data/clean folder. These files are ignored by git, and will not be added to the github repository to reduce the size of the archive.

3.1.3 Parameters

The report accepts the following parameters:

  • import_data: a logical indicating if the data should be downloaded (TRUE, default), or if local copies of the last raw data downloaded should be used (FALSE)

3.1.4 Example compilation

The following instructions will compile the report: