Skip to content

What's the story with COVID19 cases in Knoxville Metro?

License

Notifications You must be signed in to change notification settings

kcavagnolo/knx-covid

Repository files navigation

Knoxville "Metro" COVID19 Cases

What's the story with COVID19 cases in Knoxville Metro?

ABANDONED

This code is no longer useful. COVID19 testing data is not suited for even simple modeling. Final update on 2020-05-15T12:15:54.112176+00:00

Defining Knoxville Metro

Before making an estimate, let us first define what data interests us. In this case, consider the Knoxville metro area as all locations within a 30 minute or 60 minute drive time, aka, the catchment area. See details on this map. The isochrone you see on the map (green overlay) covers several counties (orange outlines; click for a name) and the associated hospitals (pink points).

Projections

To estimate the total confirmed COVID19 cases in the Knoxville metro area, I use the simplest population model: the logistic function.

Best case scenario: new case growth is regulated.

Knoxville Metro COVID19 Projected Cumulative Cases


Worst case scenario: new case growth is unregulated.

Knoxville Metro COVID19 Projected Cumulative Cases

Based on data provided by Models of Infectious Disease Agent Study (MIDAS), the rate of COVID cases requiring hospitalization is 10%-20%. The rate of hospitalized cases requiring admittance to an ICU is 5%. The Knoxville Metro area has an ICU capacity of 295 beds. Assuming the MIDAS rates, and all beds being available, the critical caseload which consumes all ICU capacity is 29,500 cases. In the worst-case scenario model (as of April 1st and before stay-at-home orders), this would have occurred around April 15th.

Knoxville Metro COVID19 Projected Cumulative Cases


Knoxville Metro COVID19 Forecasted Daily New Cases


Knoxville Metro COVID19 Cumulative Cases


Knoxville Metro COVID19 Cumulative Cases by County

Installation & Usage

Created using Python 3.8.0. Use the package manager pip to install requirements. I recommend using pyenv-virtualenv so you don't mess up your Python env.

cd analysis
pip install -r requirements

A command line script is provided in /analysis:

python3 analysis/update.py -d data/ -i imgs/ -v

A deprecated interactive Jupyter notebook is also in the analysis/ directory.

To create the animation:

ffmpeg -framerate 2 -i imgs/wc_%04d.png -r 60 -vcodec copy -acodec copy -vcodec libx264 -pix_fmt yuv420p -y imgs/wc.mp4
ffmpeg -i imgs/wc.mp4 -filter_complex "fps=2,scale=-1:640,setsar=1,palettegen" -y imgs/palette.png
ffmpeg -i imgs/wc.mp4 -i imgs/palette.png -filter_complex "[0]fps=2,scale=-1:640,setsar=1[x];[x][1:v]paletteuse" -y imgs/wc.gif

Code Quality

  1. Install and configure Sonarqube or launch a maintained container:

    docker run -it --name sonarqube -p 9000:9000 sonarqube
  2. Setup a sonar-project.properties file with configurations for scans.

  3. Run a scan:

    sonar-scanner

A video of how the source code has evolved:

knx-covid

Created using gource:

gource -s 1 -1280x720 \
       --key \
       --title "knx-covid" \
       --hide filenames \
       --date-format "%a %d %B %Y" \
       --default-user-image pic.jpg \
       -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4

Credits

References

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Creative Commons License

About

What's the story with COVID19 cases in Knoxville Metro?

Topics

Resources

License

Stars

Watchers

Forks

Languages