Giter Club home page Giter Club logo

coronamap's Introduction

COVID-19 cases vs. ICU capacity map

A daily-updating choropleth map that shows confirmed COVID-19 cases per ICU bed for each US state.

Sources

Hospital stats from Harvard Global Health Institute

Daily COVID-19 data from COVID Tracking Project

Installation

Installation is pretty simple. Clone the repo, then install python dependencies with pipenv:

pipenv install

Next, you can run the scraper manually with the cron.sh script:

./cron.sh

which will scrape COVID-19 data, aggregate it with hospital stats and GeoJSON, and insert it into a database. This will then be displayed as a map when the user views the website.

Once you've scraped the data, go ahead and start the flask server, which resides in the run.py file.

Configuration

The following vars need to be put in a config.py file inside an instance dir in the root of the repo.

  • MAPBOX_ACCESS_TOKEN: An access token for Mapbox. It's required for the map background.

  • SENTRY_DSN: A DSN for Sentry. If provided, Sentry error reporting is setup.

An example would look like this

# An access token for Mapbox. It's required for the map background.
MAPBOX_ACCESS_TOKEN = "wq.s12eD3dad21xd34g23bacs4s2c3x4ebg2muc42fdsfsfsf"

# A DSN for sentry. If provided, sentry error reporting is set up.
SENTRY_DSN = "[email protected]/32423432"

Daily Update

Add the contents of the cron.txt file to your crontab to activate daily running of the scraper.

Website

A view of the homepage

Once the server is up and running, this, along with some more information below, is what users see.

coronamap's People

Contributors

jpsank avatar

Stargazers

Lucas Kellar avatar

Watchers

 avatar

Forkers

isabellasendas

coronamap's Issues

Can't hover on iOS

On iOS 13.3 (Latest at the time of writing), I am unable to access the information gained by hovering over the states via either of the following methods.

  • Hovering: You can't hover on an iPhone
  • Clicking: That just zooms in

Is there anyway you could detect taps and make that pop up the info? Or if clicks in general aren't being used, also have those pop up the info screen until something else it clicked?

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.