Plot COVID-19 cases based on publicly available data with some emphasis on the Hawaii cases. The project is mainly for my own purpose. I do not recommend to trust my plots too much for any of your decision making. Please refer more reliable sources such WHO, CDC, and other local authorities if you are not sure what you are looking at.
It is a Python script. You need following packages to run the script.
I'm currently using the following versions.
- Python 3.6.10
- Pandas 1.0.2
- Bokeh 2.0.0
- Colorcet 1.0.0
Also, currently, I'm working in a directory with a structure like this.
.
├── covid19plot (This repository)
│ ├── csv/
│ ├── LICENSE
│ ├── make_covid19_plots.py
│ └── README.md
└── gist_covid19_plot
└── index.html (Output file from the script)
The csv
directory under this repository (covid19plot
) contains CSV files for counties in State of Hawaii with the identical format to those of the JHU CSSE database. I'm trying to keep update them, but make sure you are fine with them. The update may suddenly stop. At some point, I'm planning to use the CSV files from the NYT repository.
After the script is executed it writes index.html
under gist_covid19_plot
folder.
I should make the structure more flexible, but currently it works for my purpose.
mkdir gist_covid19_plot # sorry it's hard-coded
git clone https://github.com/monodera/covid19plot.git
It's very simple. Just execute the script.
cd covid19plot
python ./make_covid19_plots.py
At the end, you should find index.html
in the gist_covid19_plot
directory you made in the step 1. Open it with a web browser.
You can see the example of the output at https://bl.ocks.org/monodera/78ce91f69e3bf5da21302807f373b5b6 .
The script produces 4 plots with interactive legends and tooltips. You can highlight or mute lines by clicking either legend entries and lines themselves. You can also see numbers and regions at a given date by hovering the mouse cursor.
Here are some explations on what are plotted.
The cumulative number of confirmed cases at each day.
The cumulative number of deaths at each day.
Please make any pull requests and put issues.
- Masato Onodera - monodera
This project is licensed under the MIT License - see the LICENSE file for details