A webpage dashboard displaying the latest covid-19 data and news
Project description
Covid-19 Dashboard
Introduction
This is a Python project that creates a locally-hosted web page detailing up-to-date Covid-19 data and news articles. It can also schedule automatic updates to the data and articles
Pre-requisites
- Python 3.9.7 or above
- The Built-In Modules:
- Sched
- Time
- Logging
- Typing
- Json
- A NewsAPI API key (create an account here)
Installation
To install the dashboard run the following command in a command prompt:
pip install covid-dashboard-jis206
You will also need the flask module as well as the uk_covid-19 module, pytest and requests. You will need to run these commands as well:
pip install flask
pip install uk-covid19
pip install pytest
pip install requests
Getting Started
You will need to copy your API key into the config.json
replacing the <Insert API key here>
text.
Then to run the program, navigate to your installation location in the command prompt and run the command
python main.py
Once the programme is running, head to this webpage for your dashboard.
Covid Data
In the centre of the screen, you should see the infection rate in Exeter as well as the infection rate, number of hospital cases and number of deaths across England. The areas of these data sources can be adjusted in the config file.
Updates
You can schedule an update with the form in the bottom middle of the screen. Fill in when you want the update to occur, what you want the update to be called, then select what it should update and whether it should update every day or not.
If this has been done correctly, once you have hit the 'Submit' button, a toast should pop-up in the top-left hand corner detailing the update. How many toasts appear on the screen can be changed in the config file.
If you would like to cancel the update, just hit the 'x' on the toast and the update will no longer occur
News Articles
On the right hand side of the screen, you can see news articles that relate to Covid from the UK. You can see the name of each article, its source and a brief description of its contents. Furthermore, it contains a hyperlink to the full article if you would like to see more.
You can also hide the news articles with the 'x' in the top-right corner of each article. This will cause the article to not be displayed even after an update.
Config File
- api-key: Where your key should go. This should be obtained from here
- localArea: The region for which local data will be taken from. Most towns/cities are acceptable
- localAreaType: This is how large the area is. Options are
ltla, utla, region, nhsRegion
. For more information, see the UK-covid-19 API documentation - nationalArea: The region where the national data is retrieved. Must be a country within the UK or the UK itself
- nationalAreaType: What region this is. Options are
nation, overview
. For more information, see the UK-covid-19 API documentation - newsTerms: These are the terms queried by the News API. Any article containing at least one of these words will be identified. Each item to be searched must be separated by a space. To search for phrases, the phrase must be surrounded by quotes (").
- newsCountry: The country that the articles found originate from. By default, the UK. The options for countries are
ae ar at au be bg br ca ch cn co cu cz de eg fr gb gr hk hu id ie il in it jp kr lt lv ma mx my ng nl no nz ph pl pt ro rs ru sa se sg si sk th tr tw ua us ve za
. - articlesShown: The number of articles on the screen at any given time
- updatesShown: The number of updates on the screen at any given time
Details
- Released under the MIT License into the public domain
- Written by Jack Souster
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file covid-dashboard-jis206-1.0.0.tar.gz
.
File metadata
- Download URL: covid-dashboard-jis206-1.0.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
6b9a028bf5710e36ebc584726ad0c2046373e6b09edf3483bd10e2f2d5b6c7e0
|
|
MD5 |
6787bbd0c0205af3cc391cb2c2a3ebab
|
|
BLAKE2b-256 |
b3daab803d56715a06a61c9dd35d8db99c688d26a4605ddb0c97e55acddec064
|
File details
Details for the file covid_dashboard_jis206-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: covid_dashboard_jis206-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
fd096de7c5cda23c161e1542d3ba4ab176a0dabda9260769bafd45dc1546f360
|
|
MD5 |
1a4b628d6079bef5254c607e4f8b64c8
|
|
BLAKE2b-256 |
d779b3941ef2549f7ff69d5856a862be2d26e33b083e86fbc862ecaa0f380e07
|