COVID-19 Italy Monitor | #StayAtHome
Versione Italiana qui
A simple dashboard to monitor the COVID-19 outbreak in Italy, using the dataset provided by the Civil Protection (CP)
Mobile | Desktop |
---|---|
![]() |
![]() |
The app is deployed on Heroku → here
The data is taken from the CP repo → here
The WebApp uses a Flask server and gunicorn in front of it, and it only requires Python3.6+.
Furthermore, it employs Flask-babel for the italian translation. The script make_pot.sh
creates the needed files.
A Batch
version of the script is provided for Windows users.
The website's language is decided upon the client request.
The back-end retrieves the data and it serves it to the front-end chart and cards.
I'm not using any db as, luckily enough, there isn't too much data to store, and hopfully there will not be, ever.
The front-end is under covidashit/templates
and it uses a simple JS to create
the chart object, which is built using HighCharts.
Additionally, bar chart races are produced every day with a scheduled cron job that runs a script from
BCR2Mongo.
Thanks to the bar-chart-race library maintainers.
- create and activate a virtual environment (follow this)
- install the requirements in
requirements.txt
Clone the repo, cd
into it, and
$ export FLASK_ENV=development
$ export FLASK_DEBUG=1
$ python -m flask run
Flask will be listening at http://127.0.0.1:5000
The provided Dockerfile is ready to be used to deploy the app on Heroku. To test the production environment locally, uncomment L18 and L31 of the Dockerfile, and run
$ docker build --tag covidashit:latest .
$ docker run --name covidashit -d -p 80:5000 covidashit
The docker container will be listening at http://127.0.0.1
The app can be deployed on Heroku either as a docker container or simply using the Procfile
If you liked this project or if I saved you some time, feel free to buy me a beer. Cheers!