Skip to content
globe

GitHub Action

covid-19-box

v1 Latest version

covid-19-box

globe

covid-19-box

GitHub Action for injecting COVID-19 status into a gist

Installation

Copy and paste the following snippet into your .yml file.

              

- name: covid-19-box

uses: casperdcl/covid-19-box@v1

Learn more about this action in casperdcl/covid-19-box

Choose a version

🏥 covid-19-box

GitHub Action for injecting COVID-19 status into a gist.

ID Date            Cases( change)    Deaths(chnge)
US 2023-01-18 101,858,337(127,694) 1,102,794(1,574)
BR 2023-01-18 36,572,898( 12,425)   695,698(   91)
IN 2023-01-18 44,684,667(    134)   523,355(    0)
RU 2023-01-18 21,561,796(  5,442)   386,588(   46)
ME 2023-01-18  7,316,602(      0)   324,585(    0)
PE 2023-01-18  4,480,312(    941)   219,407(   26)
GB 2023-01-18 23,407,181(      0)   214,415(    0)
IT 2023-01-18 25,363,890(      0)   186,024(    0)
DE 2023-01-18 37,649,808( 12,001)   164,400(  238)
FR 2023-01-18 39,960,833(  5,894)   164,100(   82)
-- 2023-01-17 665,939,359(338,467) 6,688,816(1,879)

As of now, the automatic cloud-based pinned gist functionality is text-only; while running locally allows graph plotting.

✨ Sources

Data from ECDC

pinned gist

🎒 Prep Work

  1. Create a new public GitHub Gist (https://gist.github.com/)
  2. Create a token with the gist scope and copy it. (https://github.com/settings/tokens/new)

🖥 Project Setup

  1. Fork this repo
  2. Go to your fork's Settings > Secrets > Add a new secret for each environment secret (below)

🤫 Environment Secrets

  • gist_id: The ID portion from your gist url https://gist.github.com/<github username>/37496a4e4c84aed9711fbe3ec560888a.
  • gh_token: The GitHub token generated above.
  • countries: Comma-separated list of country IDs. Also can use all (world summary), or top (10 highest). Example: top,all,JP.

💸 Donations

Feel free to use the GitHub Sponsor button to donate towards my work if you're feeling generous <3

Local Install

Requires Python and either pip or conda. Supports interactive plotting (rather than just plain-text gists).

pip

pip install -r requirements.txt

conda

conda env create -f environment.yml
conda activate covid-19

Run

To (re)generate all graphs and summaries:

dvc update COVID-19.csv.dvc
dvc repro -P  # auto-generates `world.png` and `top.png`

World graph

Highest number of cases

To manually run,

dvc update COVID-19.csv.dvc  # at least once
python covid19.py --help

Developers

Debug the GitHub action locally using:

docker-compose build
docker-compose up