Skip to main content

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

    Screenshot of bottom middle part of webpage
    • 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

    Screenshot of top left part of webpage
    • 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
  • Remove news article

    Screenshot of top left part of webpage
    • 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)

Details

  • Made by Joshua Hammond
  • Shared under MIT (see LISENSE)
  • Source code can be found here

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

covid-19-dashboard-pkg-jwh220-0.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file covid-19-dashboard-pkg-jwh220-0.0.1.tar.gz.

File metadata

  • Download URL: covid-19-dashboard-pkg-jwh220-0.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for covid-19-dashboard-pkg-jwh220-0.0.1.tar.gz
Algorithm Hash digest
SHA256 802f61bd46aacd2dface8325a0a6147faaacd1a59b2e2b70a3c86840e34994a0
MD5 60b4c5a00ca6848c5f3cc5d19dc52350
BLAKE2b-256 90d935d46292d971e13d6ba110c85e5a025c2c806810939d8d725f9d6c90d32e

See more details on using hashes here.

File details

Details for the file covid_19_dashboard_pkg_jwh220-0.0.1-py2-none-any.whl.

File metadata

  • Download URL: covid_19_dashboard_pkg_jwh220-0.0.1-py2-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 2
  • Uploaded using 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

File hashes

Hashes for covid_19_dashboard_pkg_jwh220-0.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 129a173f7e63b57a1dac0193d5cf1d4bbb064eb8eacb0d5e17a38170834c5c93
MD5 7449ceb2c66e33f75342321841473afe
BLAKE2b-256 54d57204960d189e8cb7d8bf93bf6ea25f376ae14332555a7e3c0bdae890ab9f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page