klenwell / covid-19

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

Export epidemic waves to a json file. #70

Closed klenwell closed 2 years ago

klenwell commented 2 years ago

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

Export waves data to json file. Output file:

Command line output:

$ python app.py oc waves-json-file

OC COVID-19 JSON Export
=======================

JSON Path: /home/klenwell/projects/covid-19/docs/data/json/oc/waves.json

Notes: 
· Data Source: /home/klenwell/projects/covid-19/data/oc/daily/oc-hca-20220605.csv 
· Total Waves: 10 
· Total Smoothed Phases: 15 
· Total Phases: 86 
· Run time: 0.07 s 
· Waves:
[<EpidemicWave start=2020-03-07 end=2020-06-11 days=96 peak=2020-03-31 peak_rate=11.05>,
 <EpidemicWave start=2020-06-11 end=2020-09-13 days=94 peak=2020-07-01 peak_rate=14.73>,
 <EpidemicLull start=2020-09-13 end=2020-11-01 days=49 peak=2020-10-04 peak_rate=3.43>,
 <EpidemicWave start=2020-11-01 end=2021-03-07 days=126 peak=2020-12-30 peak_rate=19.61>,
 <EpidemicLull start=2021-03-07 end=2021-06-23 days=108 peak=2021-03-07 peak_rate=2.11>,
 <EpidemicWave start=2021-06-23 end=2021-09-11 days=80 peak=2021-08-03 peak_rate=8.61>,
 <EpidemicLull start=2021-09-11 end=2021-12-13 days=93 peak=2021-09-12 peak_rate=3.68>,
 <EpidemicWave start=2021-12-13 end=2022-03-02 days=79 peak=2022-01-03 peak_rate=25.06>,
 <EpidemicLull start=2022-03-02 end=2022-04-02 days=31 peak=2022-03-02 peak_rate=1.75>,
 <EpidemicWave start=2022-04-02 end=2022-05-28 days=56 peak=2022-05-27 peak_rate=8.25>]