Giter Club home page Giter Club logo

bd-rt-dashboard's Introduction

bd-rt-dashboard

FOSSA Status

A dashboard to display the zoning and relevant predictions about different districts of Bangladesh.

How to install dependencies and run it on your own server

# clone in git
git clone [email protected]: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

Output format

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 (so growth_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 (so doubling_time_ML, doubling_time_High_90 and so on).

Instructions for using the frontend

  1. In source/rt_computation.py, on line 17, change DATA_URL to the right CSV file (Right now we are using a Google spreadsheet's CSV export.)
  2. Run rt_computation.py. The necessary requirements are numpy, pandas, pickle, matplotlib, and scipy.
  3. This will generate two files, bd_case_history.json and rt_bangladesh.json. Host them somewhere online.
  4. In js/map.js, line 16 and 18, change the Rt_url to point to the URL of rt_bangladesh.json file, and caseHistoryUrl to point to the URL of bd_case_history.json URL.
  5. You're done!

License

FOSSA Status

bd-rt-dashboard's People

Contributors

dependabot[bot] avatar fossabot avatar notmahi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.