A dashboard to display the zoning and relevant predictions about different districts of Bangladesh.
# clone in git
git clone git@github.com:notmahi/bd-rt-dashboard.git
cd bd-rt-dashboard
# If you're looking to deploy, switch to the right branch
git checkout deploy
# set up the environment variables necessary to run this code
export COVID_DATA_DIRECTORY="/directory/where/the/output/will/be"
export COVID_DEPLOY=1
# install all the dependencies
cd source
pipenv sync
# Run the code
pipenv run python rt_computation.py
# (Optional) check the logs for a successful execution
cat deploy_logs.log | tail
In rt_bangladesh.json
, you will find a JSON dictionary like the following:
{
"Bagerhat":{
"index":{...},
"date":{...},
"ML":{...},
"Low_90":{...},
"High_90":{...},
"Low_50":{...},
"High_50":{...},
"enough_data":{...},
"growth_rate_ML":{...},
"doubling_time_ML":{...},
"growth_rate_Low_50":{...},
"doubling_time_Low_50":{...},
"growth_rate_High_50":{...},
"doubling_time_High_50":{...},
"growth_rate_Low_90":{...},
"doubling_time_Low_90":{...}
},
"Bandarban":{...},
"Barguna":{...},
"Barisal":{...},
"Bhola":{...},
"Brahamanbaria":{...},
...
}
Each of index
, ML
, Low_90
, and such are lists.
date
: Basically, the timestamp to which each index corresponds to.enough_data
: Whether we had enough data to be confident about our prediction on that day. It is false if the confidence interval is too wide.- R(t) Values:
ML
: Mean or maximum likelihood value of R(t).Low_90
/High_90
: lower and upper bounds of the 90% confidence interval.Low_50
/High_50
: lower and upper bounds of the 50% confidence interval.
- Growth rate values: Same columns as R(t) values, except with
growth_rate_
attached to the column names (sogrowth_rate_ML
,growth_rate_High_90
and so on). - Doubling time values: Same columns as R(t) values, except with
doubling_time_
attached to the column names (sodoubling_time_ML
,doubling_time_High_90
and so on).
- In
source/rt_computation.py
, on line 17, changeDATA_URL
to the right CSV file (Right now we are using a Google spreadsheet's CSV export.) - Run
rt_computation.py
. The necessary requirements arenumpy, pandas, pickle, matplotlib
, andscipy
. - This will generate two files,
bd_case_history.json
andrt_bangladesh.json
. Host them somewhere online. - In
js/map.js
, line 16 and 18, change theRt_url
to point to the URL ofrt_bangladesh.json
file, andcaseHistoryUrl
to point to the URL ofbd_case_history.json
URL. - You're done!