forked from Global-Policy-Lab/gpl-covid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun
executable file
·100 lines (71 loc) · 2.46 KB
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#!/usr/bin/env bash
set -e
pip install -e .
## data scraping and processing
### Geography/population
printf "***Downloading shape and population info for all countries***\n"
python codes/data/multi_country/get_adm_info.py
### Policy
printf "***Downloading USA testing data***\n"
python codes/data/usa/download_latest_covidtrackingdotcom_data.py
jupyter nbconvert --ExecutePreprocessor.timeout=None --ExecutePreprocessor.kernel_name=python3 --execute codes/data/usa/add_testing_regimes_to_covidtrackingdotcom_data.ipynb
### Epi
#### Multi-country
printf "***Downloading Johns Hopkins U data for all countries***\n"
Rscript codes/data/multi_country/download_6_countries_JHU.R
#### FRA
printf "***Processing FRA epi data***\n"
stata -b do codes/data/france/format_infected.do
### Dataset merging
#### CHN
printf "***Processing CHN data***\n"
python codes/data/china/collate_data.py
#### FRA
printf "***Processing FRA data***\n"
stata -b do codes/data/france/format_policy.do
# IRN
printf "***Processing IRN data***\n"
Rscript codes/data/iran/iran_cleaning.R
python codes/data/iran/iran-split-interim-into-processed.py
# ITA
printf "***Processing ITA data***\n"
python codes/data/italy/italy-download-cases-merge-policies.py
# KOR
printf "***Processing KOR data***\n"
Rscript codes/data/korea/generate_KOR_interim.R
python codes/data/korea/korea-interim-to-processed.py
# USA
printf "***Processing USA data***\n"
python codes/data/usa/merge_policy_and_cases.py
Rscript codes/data/usa/check_health_data.R
# quality-check processed datasets
printf "***Checking processed data***\n"
python codes/data/multi_country/quality-check-processed-datasets.py
## regression model estimation
printf "***Estimating regression model and creating Figure 3 and A1***\n"
stata -b do codes/models/alt_growth_rates/MASTER_run_all_reg.do
## SIR model projection
printf "***Projecting infections***\n"
python codes/models/get_gamma.py
Rscript codes/models/run_all_CB_simulations.R
## Figures and tables
# Fig 1
printf "***Creating Fig 1***\n"
Rscript codes/plotting/fig1.R
# Fig 2
printf "***Creating Fig 2***\n"
Rscript codes/plotting/fig2.R
# Fig 3
# created by regression model estimation
# Fig 4
printf "***Creating Fig 4***\n"
python codes/plotting/gen_fig4.py
python codes/plotting/fig4_analysis.py
# Table A1
printf "***Creating Table A1***\n"
python codes/plotting/count-policies.py
# Figure A1
# created by regression model estimatoin
# Figure A2
printf "***Creating Fig A2***\n"
python codes/plotting/figA2.py