klenwell / covid-19

Python command-line application to collect and analyze COVID-19 data.
0 stars 0 forks source link

Detect waves in OC positive rate data. #69

Closed klenwell closed 2 years ago

klenwell commented 2 years ago

Trello card: https://trello.com/c/lT89d3gJ

Code is able to identify Covid waves based on positive rate data.

Implementation Notes

A brief summary of how waves are detected in the Covid data:

I used test-positive data because I have found it to be the most timely, consistent, and robust source of data regarding the epidemic.

References

The following posts helped guide my implementation:

Usage

$ python app.py oc dev
avg_positive_rates 810
windows 806
phases 86
smooth_phases 15
[<EpidemicWave start=2020-03-07 end=2020-06-11 days=96>,
 <EpidemicWave start=2020-06-11 end=2020-09-13 days=94>,
 <EpidemicLull start=2020-09-13 end=2020-11-01 days=49>,
 <EpidemicWave start=2020-11-01 end=2021-03-07 days=126>,
 <EpidemicLull start=2021-03-07 end=2021-06-23 days=108>,
 <EpidemicWave start=2021-06-23 end=2021-09-11 days=80>,
 <EpidemicLull start=2021-09-11 end=2021-12-13 days=93>,
 <EpidemicWave start=2021-12-13 end=2022-03-02 days=79>,
 <EpidemicLull start=2022-03-02 end=2022-04-02 days=31>,
 <EpidemicWave start=2022-04-02 end=2022-05-21 days=49>]

Screenshot

Phases graphed against rate data:

Screenshot from 2022-06-01 22-15-53

Next step is to output a json file with data.