Growth rate and growth acceleration calculation using COVID-19 data.
Typically, Anaconda distribution for Python >= 3.6 is enough.
The notebooks present an iterative and detailed calculation of growth rate, growth acceleration and growth acceleration rate for COVID-19 cases evolution.
growth_BR_states.ipynb: Brazilian statesgrowth_BR_cities.ipynb: Brazilian citiesgrowth_US_states.ipynb: US statesgrowth_world.ipynb: World countries.
Results: CSV files for the last available date in results/dfs.
Script growth.py performes computations detailed on the notebook via command line. It downloads update data to directory data and outputs CSV files in results/dfs.
--location: Brazil, US, World.--state_or_city: state, city (option available to Brazil).--slice: set True to calculate for one specific location--slice_name(IBGE code for cities).--not_last_date: set True to check the result for an specific date (not the last one available) given by--date.--output_name: change the output file name. Default: output.csv--show_plot: set True to show plots of growth rate, acceleration,acceleration rate and number of acculated cases.--save_figdata: set True save plot data inresults/figures.
Examples:
python growth.py --location Brazil --state_or_city statepython growth.py --location Brazil --state_or_city citypython growth.py --location USpython growth.py --location Worldpython growth.py --location Brazil --state_or_city city --slice True --slice_name=3550308python growth.py --location Brazil --slice True --slice_name='RJ'python growth.py --location World --slice True --slice_name='Germany'python growth.py --location Brazil --state_or_city state --not_last_date True --date 2020-05-06python growth.py --location Brazil --state_or_city state --output_name my_name.csvpython growth.py --location US --slice True --slice_name='New York' --show_plot Truepython growth.py --location World --slice True --slice_name='South Korea' --show_plot True --save_figdata True