-
Notifications
You must be signed in to change notification settings - Fork 0
/
daily.sh
executable file
·86 lines (79 loc) · 6.94 KB
/
daily.sh
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
#!/bin/bash
###########################################################################
## Script to generate plots for daily report
###########################################################################
#
# Copyright (C) 2019 Ricks-Lab, Natalya Langford
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
###########################################################################
# Set key report parameters
RWIN=5
MWIN=3
TCOLS=12
SDIR="daily_report"
ASIA="Taiwan,Korea,Singapore,Malaysia,Japan,Thailand,Indonesia,Cambodia,Philippines,Vietnam,Cambodia,Laos,Myanmar,Australia,NewZealand,HongKong"
if [[ ! -d $SDIR ]]
then
echo "${SDIR} does not exist, exiting..."
exit
fi
echo "Using directory: ${SDIR}, rwindow: ${RWIN}, mwindow: ${MWIN}, table columns: ${TCOLS}"
# Download Data
./covid19-vi --download --mwindow ${MWIN} --rwindow ${RWIN}
set -x
# Global Reports Confirmed
./covid19-vi --type confirmed --region country --length 60 --threshold 10000 --response trajectory --mwindow ${MWIN} --rwindow ${RWIN} --minimum 10 --exclude China --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region country --length 30 --threshold 10000 --ymin 100 --response new-total --saveplot --savedir ${SDIR} --exclude China
./covid19-vi --type confirmed --region country --length 50 --threshold 600 --response rdtd --rwindow ${RWIN} --mwindow ${MWIN} --minimum 10 --exclude China,Korea --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region country --length 20 --columns ${TCOLS} --savetable --savedir ${SDIR}
# Global Reports Confirmed Top Spreading
./covid19-vi --type confirmed --region country --length 35 --threshold 1000 --response w-new-total --ymin 10 --saveplot --savetable --savedir ${SDIR} --exclude China
# Asia reports
./covid19-vi --type confirmed --region country --length 70 --threshold 100 --response trajectory --mwindow ${MWIN} --rwindow ${RWIN} --minimum 1 --include ${ASIA} --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region country --length 35 --threshold 100 --response new-total --ymin 1 --include ${ASIA} --saveplot --savetable --savedir ${SDIR}
./covid19-vi --type confirmed --region country --length 50 --threshold 100 --response rdtd --rwindow ${RWIN} --mwindow ${MWIN} --minimum 1 --include ${ASIA} --saveplot --savedir ${SDIR}
./covid19-vi --type deaths --region country --length 30 --threshold 30 --response new-total --saveplot --savedir ${SDIR} --include ${ASIA}
./covid19-vi --type deaths --region country --length 70 --threshold 30 --response trajectory --mwindow ${MWIN} --rwindow ${RWIN} --minimum 10 --include ${ASIA} --saveplot --savedir ${SDIR}
# Global Reports Deaths
./covid19-vi --type deaths --region country --length 70 --threshold 100 --response trajectory --mwindow ${MWIN} --rwindow ${RWIN} --minimum 10 --exclude China --saveplot --savedir ${SDIR}
./covid19-vi --type deaths --region country --length 30 --threshold 30 --response new-total --ymin 1 --saveplot --savedir ${SDIR} --exclude China
./covid19-vi --type deaths --region country --length 50 --threshold 60 --response rdtd --rwindow ${RWIN} --minimum 10 --exclude China --saveplot --savedir ${SDIR}
./covid19-vi --type deaths --region country --length 20 --columns ${TCOLS} --savetable --savedir ${SDIR}
# US Reports by State
./covid19-vi --type confirmed --region state --length 60 --threshold 400 --response trajectory --mwindow ${MWIN} --rwindow ${RWIN} --minimum 6 --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region state --country US --length 60 --threshold 10 --ymin 10 --response new-total --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region state --length 60 --threshold 400 --response rdtd --rwindow ${RWIN} --mwindow ${MWIN} --minimum 6 --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region state --country US --length 60 --columns ${TCOLS} --savetable --savedir ${SDIR}
./covid19-vi --type deaths --region state --country US --length 60 --columns ${TCOLS} --savetable --savedir ${SDIR}
# US Reports by County
./covid19-vi --type confirmed --region county-state --length 50 --threshold 500 --response trajectory --mwindow ${MWIN} --rwindow ${RWIN} --minimum 8 --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region county-state --country US --length 30 --threshold 10 --ymin 10 --response new-total --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region county-state --length 50 --threshold 500 --response rdtd --rwindow ${RWIN} --mwindow ${MWIN} --minimum 6 --saveplot --savedir ${SDIR}
./covid19-vi --type confirmed --region county-state --country US --length 20 --columns ${TCOLS} --savetable --savedir ${SDIR}
./covid19-vi --type deaths --region county-state --country US --length 20 --columns ${TCOLS} --savetable --savedir ${SDIR}
# US State State Reports by County
set +x
THRESH=100
LEN=20
YMIN=1
set -x
./covid19-vi --type confirmed --region county --country US --state NY --length ${LEN} --columns ${TCOLS} --threshold ${THRESH} --ymin ${YMIN} --response new-total --saveplot --savetable --savedir ${SDIR}
./covid19-vi --type confirmed --region county --country US --state AZ --length ${LEN} --columns ${TCOLS} --threshold ${THRESH} --ymin ${YMIN} --response new-total --saveplot --savetable --savedir ${SDIR}
./covid19-vi --type confirmed --region county --country US --state IL --length ${LEN} --columns ${TCOLS} --threshold ${THRESH} --ymin ${YMIN} --response new-total --saveplot --savetable --savedir ${SDIR}
./covid19-vi --type confirmed --region county --country US --state OR --length ${LEN} --columns ${TCOLS} --threshold ${THRESH} --ymin ${YMIN} --response new-total --saveplot --savetable --savedir ${SDIR}
./covid19-vi --type confirmed --region county --country US --state WA --length ${LEN} --columns ${TCOLS} --threshold ${THRESH} --ymin ${YMIN} --response new-total --saveplot --savetable --savedir ${SDIR}
./covid19-vi --type confirmed --region county --country US --state CA --length ${LEN} --columns ${TCOLS} --threshold ${THRESH} --ymin ${YMIN} --response new-total --saveplot --savetable --savedir ${SDIR}
./covid19-vi --type confirmed --region county --country US --state FL --length ${LEN} --columns ${TCOLS} --threshold ${THRESH} --ymin ${YMIN} --response new-total --saveplot --savetable --savedir ${SDIR}
./covid19-vi --type confirmed --region county --country US --state TX --length ${LEN} --columns ${TCOLS} --threshold ${THRESH} --ymin ${YMIN} --response new-total --saveplot --savetable --savedir ${SDIR}