Code and data for Leech et al (2021), "Mass mask-wearing is associated with reduced COVID-19 transmission"
by Charlie Rogers-Smith and Gavin Leech, based on the work of Brauner et al.
git clone https://github.com/g-leech/masks_v_mandates.git
- Get Poetry.
cd masks_v_mandates
poetry install
cd data/raw
wget https://www.gstatic.com/covid19/mobility/Global_Mobility_Report.csv
wget https://www.gstatic.com/covid19/mobility/Region_Mobility_Report_CSVs.zip
unzip Region_Mobility_Report_CSVs.zip
rm Region_Mobility_Report_CSVs.zip
wget https://github.com/OxCGRT/covid-policy-tracker/blob/master/data/OxCGRT_latest.csv
python ../../scripts/pull_from_umd_api.py
cd ../..
poetry shell
python scripts/produce_master_model_data.py
mkdir pickles
python3 scripts/main_model_runner.py --model="cases" --masks="wearing" --mob="include"
python3 scripts/main_model_runner.py --model="cases" --masks="mandate" --mob="include"
After about 6 hours, this will produce two posterior traces in pickles
which can be loaded and visualised with model_check_and_viz, changing the filenames in Load pickles
.
The data used is from the following sources.
- National nonpharmaceutical interventions: OxCGRT.
- National confirmed case counts: Johns Hopkins CSSE via OxCGRT.
- World mask wearing survey: UMD / Facebook
- US mask wearing survey: Rader (2021)
- National mobility index: Google Mobility Reports