Giter Club home page Giter Club logo

covid-19's Introduction

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

As of December 10, 2020, I stopped updating my demo site because, unfortunately, there is too much data to process and upload to the server. Also, the client-only model doesn't seem to work smoothly at this point. It became too slow to be practical. It wasn't expected at all when I started writing this code early this year.

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

covid-19's People

Contributors

huidaecho avatar javierconcha avatar minji-mia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

covid-19's Issues

Data and Map not showing

Hello Huidae,
For some reason, the maps and numbers are not showing on your website. The same is happening in my mine. Do you know why?

Error when i try to fetch data

Fetching CSSE CSV...
2020/04/01...2020/03/31...2020/03/30...2020/03/29...2020/03/28...
2020/03/27...2020/03/26...2020/03/25...2020/03/24...2020/03/23...
2020/03/22...2020/03/21...2020/03/20...2020/03/19...2020/03/18...
2020/03/17...2020/03/16...2020/03/15...2020/03/14...2020/03/13...
2020/03/12...2020/03/11...2020/03/10...2020/03/09...2020/03/08...
2020/03/07...2020/03/06...2020/03/05...2020/03/04...2020/03/03...
2020/03/02...2020/03/01...2020/02/29...2020/02/28...2020/02/27...
2020/02/26...2020/02/25...2020/02/24...2020/02/23...2020/02/22...
2020/02/21...2020/02/20...2020/02/19...2020/02/18...2020/02/17...
2020/02/16...2020/02/15...2020/02/14...2020/02/13...2020/02/12...
2020/02/11...2020/02/10...2020/02/09...2020/02/08...2020/02/07...
2020/02/06...2020/02/05...2020/02/04...2020/02/03...2020/02/02...
2020/02/01...2020/01/31...2020/01/30...2020/01/29...2020/01/28...
2020/01/27...2020/01/26...2020/01/25...2020/01/24...2020/01/23...
2020/01/22...
Fetching CSSE CSV completed
Fetching CSSE REST...
Traceback (most recent call last):
File "fetch_data.py", line 1215, in
fetch_csse_rest()
File "fetch_data.py", line 379, in fetch_csse_rest
features = fetch_all_features(features_url)
File "fetch_data.py", line 367, in fetch_all_features
res = json.loads(res.content.decode())
File "/usr/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

New feature request: Show c, r, and d of an specific country against 5 other countries

Hello Huidae,
I just saw your improved display of confirmed, recovered and death plots. It is looking very good. I was just talking about that feature with some of my users.

I am wondering if it is possible to display for instance always Chile, against the 5 countries with the most confirmed cases for comparison. I guess I would have to pull the data from those countries to have them locally, at least once per day.

Thanks!

Chile data not correct

Hello Huidae,

The numbers for Chile are not correct. It shows that the last update happened on April 20. Also, it shows the wrong number of deaths for the Chile and the Valparaiso province.

New feature request: To be able to sort by provinces instead of countries

In my case, because I am displaying only one country separated by provinces, I would like to be able to show the menu on top of the map with the country and the provinces (I mean the menu with the blue links to the different countries and that you can change the sorting based on c, r or d). Something like this:

Chile: province1, pronvince2, etc..

Is it possible?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.