/covid-19

Open source version of the COVID-19 global cases website by Johns Hopkins CSSE

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

Coronavirus Disease 2019 (COVID-19) Cases Tracker

This web map is an open source version of the COVID-19 global cases website by Johns Hopkins CSSE. It uses OpenLayers for mapping, Plotly.js for plotting, and Iconify for icons.

UPDATES

Single-country maps are now supported:

As of March 27, 2020 at 6pm EDT, fetch_data.py's count of the United States cases is 697 greater than CSSE's. I checked individual states and created the following table:

County State CSSE CSV CSSE REST
Coffee Alabama 1 0
Fairbanks North Star Alaska 11 10
Cleburne Arkansas 47 46
Dawson Georgia 3 2
Unassigned Hawaii 8 6
Bannock Idaho 3 2
Bingham Idaho 2 1
Unassigned Illinois 668 N/A
LaSalle Illinois 3 0
Logan Illinois 1 0
Ascension Louisiana 91 90
Morehouse Louisiana 3 2
Jackson Michigan 17 16
Newaygo Michigan 2 1
Amite Mississippi 1 0
Houston Tennessee 3 2
Guadalupe Texas 9 8
Walker Texas 3 2
Unassigned Vermont 8 6
Norfolk Virginia 9 8
Fairfax City Virginia 1 0
Unassigned Washington 69 67
Preston West Virginia 2 1
Ohio West Virginia 2 1
Hancock West Virginia 1 0

Data from the REST API is supposed to be current because their web map directly uses this data for visualization, but some of those numbers are decreasing for some counties in the United States. I have no idea which version to trust more between their daily reports vs. REST data.

Configuration

  1. Create and secure your Bing Maps key at https://www.bingmapsportal.com/
  2. Copy config-example.py to config.py
  3. Set bing_maps_key and bing_maps_referer (your secured URL from step 1)
  4. Set app_url to your covid-19 web map URL
  5. Set use_local_data_only to True if you don't want to fetch remote data and just want to use files in the data folder
  6. Add country names to countries_to_display to save data only for those countries

Data Sources

I found CSSE's data unreliable because they keep changing country names and adding duplicate entries with incomplete records. I am trying to clean up their data as much as possible to avoid double counting (e.g., as of March 17, Guam vs. Guam, US and French Guiana vs. French Guiana, France), so there can be some discrepancy between my cleaned up data and their original data.

Data Files

  • geodata.json: GeoJSON file with case locations and time series data
  • data.csv: CSV file with the same information in a tabular format

Disclaimer

Data that fetch_data.py collects from various data sources is copyrighted by its original owners. Post-processing of the data by the script may introduce errors and the author is not responsible for any damages caused by using the processed data and the web map.

License

Copyright (C) 2020, Huidae Cho <https://idea.isnew.info>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

Other Resources