Skip to content

rjjfox/covid-dashboard

Repository files navigation

COVID-19 Dashboard

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.

screenshot

Table of Contents

Getting Started

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.

Prerequisites

You will need Python v3.6 or later on your local machine.

Installing

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.

Deployment

PythonAnywhere

I'm using PythonAnywhere's free tier to host this site. See their simple guide to "Setting up Flask applications on PythonAnywhere".

Heroku

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/.

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details