This repository contains Python and R code that KISR and Kuwait University have developed to compute the time-dependent reproductive number R(t).
Authors:
- Python: Mohammad M. Khajah
- R: Mohammad Al-Khamis
- Install R
- Install Python 3.6+
- Open a Terminal. Clone the repository and move into the application's directory:
$ git clone https://github.com/KISRDevelopment/dairly_rt_report.git
$ cd daily_rt_report- Create a virtual environment for Python, activate it, and install the application's dependencies. A virtual environment is an isolated environment where you can install application specific packages without affecting the global Python environment.
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install -r requirements.txt- Place the
Swabs Processed.xlsxfile in thedaily_rt_reportdirectory. Make sure it's name is exactly as shown. - Open the terminal and navigate to the
daily_rt_reportdirectory and activate the Python environment.
$ cd daily_rt_report
$ . venv/bin/activate- To generate the weekly report:
$ python reporter.py report_weekly.jsonFor the daily report:
$ python reporter.py report_daily.json- This command will create an HTML report page at
daily_rt_report/tmp/report_weekly/r0td_report.html. - Open the HTML page in Google Chrome and print it to PDF.
The parameters of the generated reports can be adjusted by changing the JSON configuration file. These parameters include the countries that are covered, whether or not adjust for swabs, the number of days to aggregate, the generation time parameters, and so on.