COVID-19 Dashboard
Table of Contents
Introduction:
Creates a locally hosted webpage containing COVID-19 data and news:
- local last 7 days infection rate
- national last 7 days infection rate
- national current hospital cases
- national total deaths (from COVID-19)
Prerequisites
- Python 3.10.0 64-bit
- Python sched module
- Python time module
- Python json module
- Python logging module
- Python flask module
- Python markupsafe module
- uk_covid19 module (infomation here)
- newsapi module (infomation here)
Instalation
pip install x
Getting Started
- In the file 'config.json', add your API key where it says "news API key here"
- Run the package
- There will be no visual confirmation that it is running successfully
- In a web browser go to http://127.0.0.1:5000/
-
Adding update
- Add the time of the update to the top input box (where it says '12:30')
- Add the name of the update to the second input box (where it says 'Update label')
- If you want the update to happen every 24-hour, check the 'Repeat update' box; if it is a one-off, leave it unchecked
- Depending if you want to update the COVID-19 data or news, check the relevant boxes ('Update Covid data' or 'Update news articles')
- If neither box is checked, the update will not be set
- Both boxes can be checked at once, creating an update for the data and news uder the same name
- New updates can't be set for the same time as scheduled updates
- Press the 'Submit' button to create your new update (as the number of visible updates is limited to the next 5, you may not see the update appear instantly)
-
Remove update
- Click on the cross on the top right of an update to remove it
- If you have a news and data update, like 'example combiation', there is no way to remove just the data or news update
- Click on the cross on the top right of an update to remove it
-
Remove news article
- Click on the cross on the top right of a news article to remove it
Testing
- Enter a terminal
- Navigate to the folder conataining this
- Run
pytest(infomation here)
Developer Documentation
-
config.json
- api_key : string
- add your newsapi key here
- news_search_terms : string
- add any search terms you want headlines for, separated by a space for multiple search terms
- default searches for covid-19 related news
- location : string
- location_type : string
- add your chosen area here
- see valid filters here
- updates : list
- a list of updates to add when start, formatted like an update (see below)
- update : dictionary
- a preset update to be added to the page
- name : string
- the name of the update
- time : string in format "HH:MM" or float
- the time of day the update should occur ("HH:MM") OR
- the amount of time (in seconds) from startup to the update
- type : string
- the type of update
- "data" for data update
- "news" for news update
- "both" for data and news update
- repeat : string
- whether the update should repeat every 24 hours
- "False" for single update
- "True" for repeating update
- web_title : string
- the title of the page
- language : string
- the language of articles that should be fetched (see valid options here)
- api_key : string
Details
Metadata
Release files for covid-19-dashboard-pkg-jwh220 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| covid-19-dashboard-pkg-jwh220-0.0.1.tar.gz | 4.2 kB | Without provenance | Details for covid-19-dashboard-pkg-jwh220-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| covid_19_dashboard_pkg_jwh220-0.0.1-py2-none-any.whl | Python 2 | none | any | Details for covid_19_dashboard_pkg_jwh220-0.0.1-py2-none-any.whl |
Total release size: 10.2 kB
Release files / covid-19-dashboard-pkg-jwh220-0.0.1.tar.gz
| Download URL | covid-19-dashboard-pkg-jwh220-0.0.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
802f61bd46aacd2dface8325a0a6147faaacd1a59b2e2b70a3c86840e34994a0
|
|
BLAKE2b-256 checksum How to use checksums |
90d935d46292d971e13d6ba110c85e5a025c2c806810939d8d725f9d6c90d32e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Release files / covid_19_dashboard_pkg_jwh220-0.0.1-py2-none-any.whl
| Download URL | covid_19_dashboard_pkg_jwh220-0.0.1-py2-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
129a173f7e63b57a1dac0193d5cf1d4bbb064eb8eacb0d5e17a38170834c5c93
|
|
BLAKE2b-256 checksum How to use checksums |
54d57204960d189e8cb7d8bf93bf6ea25f376ae14332555a7e3c0bdae890ab9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
|
Security for covid-19-dashboard-pkg-jwh220 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.