A data dashboard giving a snapshot of the COVID-19 situation in the UK and France. Built with Python using Flask and Plotly and hosted on Heroku as a web app. See it live here.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You will need Python v3.6 or later on your local machine.
Clone/fork the repo onto your local machine.
It is then recommended to use a virtual environment to install the dependencies using the requirements.txt
file.
pip install -r requirements.txt
With these installed, you simply need to run
flask run
We have defined a .flaskenv
file to hold flask environment variables which Flask knows to look for since we installed the python-dotenv
package with the requirements.txt
.
After running flask run
, you will be given a local address to see the web app live.
I'm using PythonAnywhere's free tier to host this site. See their simple guide to "Setting up Flask applications on PythonAnywhere".
A Procfile for the app has already been created for this repo if you would like to deploy to Heroku. Therefore simply, create a project on Heroku's website. For the next step, I recommend linking the project to a Github repository in the Deploy section. This can be setup through the website.
Alternatively, you can use the Heroku CLI. Provided you have already created a project on the site, use
heroku git:remote -a [project-name]
git push heroku master
Use the same project name as the one you created. If successful, you can then go to https://[project-name].herokuapp.com/
.
- Flask - The web application framework used
- Plotly - For data visualization
- UK Government COVID-19 API - For UK data
- WHO Data - For France data
- Heroku - Cloud platform used for deployment
This project is licensed under the MIT License - see the LICENSE.md file for details