ISARICDataPlatform / ISARIC-COVID-reports

MIT License
6 stars 2 forks source link

ISARIC-COVID-reports

Background

In response to the emergence of novel coronavirus (COVID-19), ISARIC has launched a portfolio of resources to accelerate outbreak research and response, including tools for data collection, analysis and presentation. These tools have undergone extensive review by international clinical experts, and are free for all to use. The R code presented here has been developed by ISARIC and enables sites to produce rapid reports summarising the clinical characteristics of hospitalised patients with COVID-19. We hope that these reports will guide local responses, whilst supporting researchers to retain control of their data in the long-term. Data contributors are invited to input on the methods and contents of these reports. Additional information and resources are available on the ISARIC website.

Installation

The R code is provided as a package called "COVIDreportwriter". To install this, first download the GitHub repository, either by using the links on this page or using the command line (in the MacOS/Linux/Unix terminal or git bash):

git clone https://github.com/ISARICDataPlatform/ISARIC-COVID-reports.git

You may also need to install pandoc and the R library "devtools". A LaTeX installation is also required. One option is to use the R package "tinytex". With that installed the command

tinytex::install_tinytex()

will install the software required to run the reports.

With the ISARIC-COVID-reports respository downloaded, navigate to the directory containing it using the R command line and type:

library(devtools)
install("COVIDreportwriter", dependencies = TRUE)

Alternatively, the repository can be downloaded and installed directly from GitHub within R:

library(devtools)
install_github('ISARICDataPlatform/ISARIC-COVID-reports/COVIDreportwriter')

For basic operation, you require two files from REDCap output: a data file and a data dictionary file. Supposing the file name of the former is data.csv and the latter data_dict.csv, a basic report can be generated using the R commands:

library(COVIDreportwriter)
imported.data <- import.and.process.data("data.csv", "data_dict.csv")
generate.report(imported.data, "report.pdf", "My site")

This should output a report named "report.pdf". The third argument to generate.report is an identifier for your data, for example the name of a hospital site.