What's the story with COVID19 cases in Knoxville Metro?
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
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).
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.
Worst case scenario: new case growth is unregulated.
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.
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
-
Install and configure Sonarqube or launch a maintained container:
docker run -it --name sonarqube -p 9000:9000 sonarqube
-
Setup a
sonar-project.properties
file with configurations for scans. -
Run a scan:
sonar-scanner
A video of how the source code has evolved:
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
- Data from The New York Times, based on reports from state and local health agencies
- Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE) raw COVID data
- MIDAS 2019 Novel Coronavirus GitHub Repository
- Tennessee county boundaries
- Tennessee hospital locations
- CMS Hospital Referral Regions (HRR)
- Mapbox maps
- Mapbox contributor plugins
- OpenStreetMap road network data
- Facebook Prophet forecasting
- Seaborn data visualization
gource
source code visualization
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.