/covid_w_plotlydash

First venture into plotly dash based dashboards. Done for COVID data.

Primary LanguageJupyter Notebook

Introduction

I always wanted to learn how to create dashboards, this is my first venture into that world using Plotly-Dash. Hosting was done via Flask and Gunicorn, in Ubuntu 20.04.

How to

Explore the data using covid_explore.ipynb

  1. Install conda:
    wget -P /tmp https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh
    bash /tmp/Anaconda3-2020.07-Linux-x86_64.sh
  2. Create conda environment: conda env create --name MY_ENV -f environment.yml python=3.8.*
  3. Update/Create the database: python update_db.py
  4. Test the dashboard on port 8051: python covid_dash.py
  5. Deploy the dashboard on port 8050:
    # Or just run the update_db.sh script.
    conda activate MY_ENV
    pkill gunicorn
    gunicorn -w 4 -b 0.0.0.0:8050 covid_dash:server &
    conda deactivate

Demo

preview.png

Sources