Giter Site home page Giter Site logo

nrsander / covid-data-model Goto Github PK

View Code? Open in Web Editor NEW

This project forked from act-now-coalition/covid-data-model

0.0 0.0 0.0 79.15 MB

Data backend providing computed data for the graphs displayed at https://covidactnow.org

Home Page: https://covidactnow.org/

License: MIT License

Python 74.40% Jupyter Notebook 24.47% Makefile 0.05% Shell 1.09%

covid-data-model's Introduction

COVID-19 Data Model

Objective: Provide a library/API that ingests COVID-19 data to provide simulated outcomes based on local isolation/quarantine policy levers as represented in published models.

Check It Out in Jupyter Binder

Resources

Models

Data Sources

See covid-data-public for data sources being used or considered.

API Snapshots

We automatically build & publish an API snapshot (e.g. https://data.covidactnow.org/snapshot/123/) twice a day via a github action. To manually kick off a new snapshot, get a personal access token, and run:

export GITHUB_TOKEN=<YOUR PERSONAL GITHUB TOKEN>
./tools/push-api.sh

Once a snapshot has been vetted, you can "label" it with a friendly name, e.g. pointing https://data.covidactnow.org/v0/ at https://data.covidactnow.org/snapshot/123/ with:

export GITHUB_TOKEN=<YOUR PERSONAL GITHUB TOKEN>
./tools/label-api.sh v0 123

Development

Run website data deploy

This will run all models and generate data needed for the website, outputting to ../covid-projections/public/data.

./deploy_website.sh

Sentry

In order to have sentry run locally and report errors to the dev sentry instance, add the following to your .env

export SENTRY_DSN=https://<GET_SENTRY_DSN_FOR_DEV_INSTANCE>.ingest.sentry.io/<DEV_INSTANCE>

The gitub action pulls the sentry_dsn for the prod instance from a secrets stored within github.

PySEIR Setup

Installation

Recommend virtualenv or miniconda python 3.7 from here https://docs.conda.io/en/latest/miniconda.html

If using conda, you can use the following:

  • conda create python=3.7 -n covid-data-model
  • conda activate covid-data-model
  • pip install -r requirements.txt -r requirements_test.txt

Running Models

PySEIR provides a command line interface in the activated environment. You can access the model with pyseir --help and pyseir <subcommand> --help providing more information.

Example: pyseir build-all --states="New York" will run state and county models for New York. States can also be specified by their state code: --states="New York" and --states=NY are equivalent.

Check the output/ folder for results.

Model Output

There are a variety of output artifacts to paths described in pyseir/utils.py. The main artifact is the ensemble_result which contains the output information for each suppression policy -> model compartment as well as capacity information.

covid-data-model's People

Contributors

davidstrauss avatar ghop02 avatar zhang-xinyu avatar fridiculous avatar tsebens avatar igorkofman avatar mikelehen avatar erccarls avatar goldblatt avatar jamestamplin avatar playermanny2 avatar brettboval avatar asciimike avatar jeremiq avatar gsoltis avatar raphomet avatar crwilcox avatar abeisgoat avatar jredding avatar tomgobravo avatar vincentwoo avatar traethethird avatar tashwoods avatar pgrimaud avatar

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.