Skip to main content

lag time and death rate per infection

Project description

covidlag

Data science is useful to investigate the progression of the pandemic. This repository proposes a new tool covidlag for analyzing a lag time between infection peaks and death peaks. Covidlang is a open-source program which can provide the lag time and the death rate per infection.

Polynomial curve-fitting algorithm is used for detecting infection peaks and death peaks. The lag time is a difference between a infection peak and a death peak. The average death rate per infection can be also calculated. In shorter lag time, we must treat infected patients in urgent manners. In longer lag time, we must provide sufficient hospital accomodation. In higher death rate per infection, we must strengthen policies.

How to install covidlag

Covidlag is available in public and can be installed by the PyPI packaging:

$ pip install covidlag

How to run covidlag

Run the following command composed of the country name, sampled days, the degree of polynomial curve-fitting, and options (L: left, R: right, C: center):

$ covidlag Japan 400 13 L

This example shows the 13th degree polynomial curve-fitting using 400 days has r-squared of infections:0.923 and r-squared of deaths:0.706.

The death peaks are [152 267 374].
death peak: 2021-01-29 <-
death peak: 2021-05-24 <-
death peak: 2021-09-08 <-

The case peaks are [27 133 252 258].
case peak: 2020-09-26
case peak: 2021-01-10 <-
case peak: 2021-05-09 <-
case peak: 2021-08-23 <-

The lag time between infections and deaths is 19 days, 15 days, and 16 days respectively.

The number of every death peak is [88 92 54].

The number of every case peak is [526 4421 5902 20029]

Therefore, death rate of peaks is 88/4421=0.019, 92/5902=0.015, 54/20029=0.0026 respectively.

$ covidlag 'United States' 600 13 L

This example shows that r-squared of infections:0.803 and r-squared of deaths:0.733

The death peaks are [71 189 337 470 579]

death peak: 2020-04-23
death peak: 2020-08-19
death peak: 2021-01-14
death peak: 2021-05-27
death peak: 2021-09-13

The case peaks are [52 156 315 448 566]

case peak: 2020-04-04
case peak: 2020-07-17
case peak: 2020-12-23
case peak: 2021-05-05
case peak: 2021-08-31

The lag time between infections and deaths is 19 days, 33 days, 22 days, 22 days, 13 days.

The number of every death peak is [1944 1005 3109 632 1943].

The number of every case peak is [28858 57877 207829 44827 178454]

The death rate per infection is 1944/28858=0.067,1005/57877=0.017,3109/207829=0.015,632/44827=0.014,1943/178454=0.011

$ covidlag Canada 400 13 L

death peak: 2020-09-07
death peak: 2021-01-06
death peak: 2021-05-08
death peak: 2021-09-25
case peak: 2020-09-07
case peak: 2020-12-26
case peak: 2021-04-21
case peak: 2021-09-19
The lag time is 11 days, 17 days,...

The death rate per infection is 0.018,0.006,...

Project details


Download files

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

Source Distribution

covidlag-0.0.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distributions

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

covidlag-0.0.2-py3.8.egg (5.9 kB view details)

Uploaded Egg

covidlag-0.0.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file covidlag-0.0.2.tar.gz.

File metadata

  • Download URL: covidlag-0.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

File hashes

Hashes for covidlag-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d14e2b6f2056bb47af48b818f00de82b695c9e8884d750cc8499be622f118d7c
MD5 2b1d95027b1dc237fdbcad8b02556cc5
BLAKE2b-256 ed3f1a0740d71b373d45cde2a45f09ebf442de30b5ecb5d75407b09cae3bb6bc

See more details on using hashes here.

File details

Details for the file covidlag-0.0.2-py3.8.egg.

File metadata

  • Download URL: covidlag-0.0.2-py3.8.egg
  • Upload date:
  • Size: 5.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

File hashes

Hashes for covidlag-0.0.2-py3.8.egg
Algorithm Hash digest
SHA256 2b7ebf5eb5c6c6b4234734614808fd9aafe36114d7dbb3235b6c3cb83a06704f
MD5 ba4d304020c45b856921635c26e3a7ce
BLAKE2b-256 c4ca0fbf96f794b1016877d59d10746caa3ed14dc429d6bce64724f1527ccf67

See more details on using hashes here.

File details

Details for the file covidlag-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: covidlag-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

File hashes

Hashes for covidlag-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21a5708fcb95fa6af52f66354e571ecf3950f951894a47bfe2d7e3a0c08a853c
MD5 abc9ed09ed92982c73dd7a2f7b1e0966
BLAKE2b-256 fba6036d3a120d811d5d3b8c5ae74527768d502a200ed96cee57b10a1f15117d

See more details on using hashes here.

Supported by

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