This subfolder contains codes for the estimation of R numbers and transmission rates for individual countries with available case data as reported by JHU data hub. 

The script to run is: "RunMe.m". This file contains comments that will help user. 

There are two options how to run this script:

(i) When "download=0" on line 10 of  (this is the default option), the script will proceed with loading localy saved data using files 'confirmed_cases_txt' (JHU data) and 'WHO-COVID-19-global-data_22Dec2021.csv' (WHO data - used for Spain and France only due to mistakes in JHU data). 

(ii) When "download=1" on line 10, this script will download the latest data from John Hopkins University and automatically save the data in the local file 'confirmed_cases_txt'. WHO data file (currently 'WHO-COVID-19-global-data_22Dec2021.csv') still needs to be updated/downloaded manually using https://covid19.who.int/WHO-COVID-19-global-data.csv. WHO file is only used by functions 'correct_spanish_data.m' and 'correct_french_data.m', which need to be updated manually (if new WHO file is used).

In addition to COVID-19 case data, script also loads population data from Excel file "population.xlsx".

The outcome of the estimations is saved in Excel file "Estimates.xlsx". This file contains the following sheets:
- Sheets "R_mfX" (red), where X stands for different values of multiplication factor considered, namely X=2, 2.5, 3, 5, and 7 is reported. These sheets report the estimated R values for individual countries and given multiplication factor. First row contains dates.
- Sheets "bg_mfX" (blue), where X stands for different values of multiplication factor considered, namely X=2, 2.5, 3, 5, and 7 is again reported. These sheets contain the estimates of effective transmsission rate beta x 14 (in which 14=1/gamma).
- Sheet "dc" (yellow) contains 7-day moving average of new cases per 100k population. 

Estimates of R numbers and effective transmission rates are subject to the chosen upper bound set equal to 6 (this upper bound can be changed in compute_trans_rates_hc.m).

After the main script RunMe.m is finished, Matlab script "create_main_figures.m" can be executed to create selected figures and save them (in pdf format) in subfolder "\figures". 