Skip to content

Models of COVID-19 outbreak trajectories and hospital demand

License

Notifications You must be signed in to change notification settings

knoefel/covid19_scenarios

ย 
ย 

Repository files navigation

COVID-19 Scenarios

Models of COVID-19 outbreak trajectories and hospital demand

๐ŸŒ neherlab.org/covid19/

An animated screenshot of the application, showcasing the user interface on main page

Got questions or suggestions?

Discussions are here


๐Ÿ” Discover

Simulator Source code repository Data repository Updates
Image with app logo and text 'Try' Image with GutHub logo and text 'Get Involved' Image with GutHub logo and text 'Add Data' Image with Twitter logo and text 'Follow'


๐Ÿ‘€ Overview

This tool is based on an SIR model (see about page for details) that simulates a COVID19 outbreak. The population is initially mostly susceptible (other than for initial cases). Individuals that recover from COVID19 are subsequently immune. Currently, the parameters of the model are not fit to data but are simply defaults. These might fit better for some localities than others. In particular the initial cases counts are often only rough estimates.

The primary purpose of the tool is to explore the dynamics of COVID19 cases and the associated strain on the health care system in the near future. The outbreak is influenced by infection control measures such as school closures, lock-down etc. The effect of such measures can be included in the simulation by adjusting the mitigation parameters. Analogously, you can explore the effect of isolation on specific age groups in the column "Isolated" in the table on severity assumptions and age specific isolation.

Most parameters can be adjusted in the tool and for many of them we provide presets (scenarios).

Input data for the tool and the basic parameters of the populations are collected in a separate repository neherlab/covid19_scenarios_data. Please add data on populations and parsers of publicly available case count data there.


๐Ÿ“• User's Guide

The online application provides a friendly user interface with drop downs to choose model parameters, run the model, and export results in CSV format. A detailed process is below.

Parameters: population

Select the population drop down and select a country/region to auto-populate the model's parameters with respective UN population data. These parameters can be indivdually updated manually if necessary.

Parameters: epidemiology

The epidemiology parameters are a combination of speed and region - specifying growth rate, seasonal variation, and duration of hospital stay. To choose a preset distribution, select one of the options from the epidemiology drop down to auto-populate the model's parameters with the selected parameters.

Parameters: mitigation

Mitigation parameters represent the reduction of transmission through mitigation (infection control) measures over time. To select a preset, click on the mitigation dropdown and select one of the options. Otherwise, the points on the graph can be dragged and moved with the mouse. The parameter ranges from one (no infection control) to zero (complete prevention of all transmission).

Running the Model

Once the correct parameters are inputted, select the run button located in the Results section of the application. The model output will be displayed in 2 graphs: Cases through time and Distribution across groups and 2 tables: Populations and Totals/Peak.

Exporting Results

The model's results can be exported in CSV format by clicking the "export" button in the right hand corner.


๐Ÿ–ฅ๏ธ Development

Quick Start

Install Requirements

  • Git 2.0+
  • Node >= 10+
  • Yarn 1.x

Then in your terminal type:

git clone --recursive https://github.com/neherlab/covid19_scenarios
cd covid19_scenarios/
cp .env.example .env
yarn install
yarn dev

(on Windows, substitute cp with copy)

This will trigger the development server and build process. Wait for the build to finish, then navigate to http://localhost:3000 in a browser (last 5 versions of Chrome or Firefox are supported in development mode).

โ„น๏ธ Hint: type "rs" in terminal to restart the build

โ„น๏ธ Hit Ctrl+C in to shutdown the server

Directory Structure

As a developer you are most likely interested in the actual source code in src/ directory.

File or directory Contents
๐Ÿ“__mocks__/
๐Ÿ“algorithims/ Contains the algorithm implementation code
โ”œ๐Ÿ“test-data/ Contains algorithm test data
โ”œ๐Ÿ“test/
โ”œ๐Ÿ“utils/
โ”œ๐Ÿ“„model.ts/ Model implementation
โ”œ๐Ÿ“„run.ts/
๐Ÿ“assets/ Contains model data, application image, and text files
๐Ÿ“components/ Application React components
โ”œ๐Ÿ“Form/
โ”œ๐Ÿ“LanguageSwitcher/
โ”œ๐Ÿ“Layout/
โ”œ๐Ÿ“Links/
โ”œ๐Ÿ“Main/
โ”œโ”œ๐Ÿ“Compare/
โ”œโ”œ๐Ÿ“Containment/
โ”œโ”œ๐Ÿ“Results/
โ”œโ”œ๐Ÿ“Scenario/
โ”œโ”œ๐Ÿ“state/
โ”œโ”œ๐Ÿ“validation/
โ”œโ”œ๐Ÿ“„Disclaimer.tsx/
โ”œโ”œ๐Ÿ“„Main.scss/
โ”œโ”œ๐Ÿ“„Main.tsx/ Main react component
โ”œ๐Ÿ“PageSwitcher/
โ”œ๐Ÿ“Router/
โ”œ๐Ÿ“„App.tsx/
๐Ÿ“helpers/
๐Ÿ“locales/
๐Ÿ“pages/ Application website page implementations
๐Ÿ“server/ Server that serves production build artifacts
๐Ÿ“state/
๐Ÿ“styles/ CSS style files
๐Ÿ“types/
๐Ÿ“„i8n.ts
๐Ÿ“„index.ejs
๐Ÿ“„index.polyfilled.ts Entry point
๐Ÿ“„index.tsx
๐Ÿ“„langs.ts
๐Ÿ“„links.ts
๐Ÿ“„routes.ts

Production build

In order to replicate the production build locally, use this command:

yarn prod:watch

This should build the application in production mode and to start static server that will serve the app on http://localhost:8080 (by default)

Release ccycle, continuous integration and deployment

TODO

Getting Started

For new contributers, follow the guide below to learn how to install required software, fork & clone, and submit changes using a pull request.

โœจ Installing Required Software

  1. Install Git by following GitHub's instructions here

  2. Node.js can be installed using nvm on Mac/Linux and nvm-windows on Windows.

  3. Yarn can be globally installed following these steps

๐Ÿด Forking the Repo

Click the Fork button on the upper right-hand side of the repositoryโ€™s page.

๐Ÿ‘ฏ Clone Forked Repository

Clone this repository recursively (including submodules) to your local machine. You can use the URL of your repo inside git command, for example:

git clone --recursive https://github.com/<YOUR_GITHUB_USERNAME>/covid19_scenarios

๐Ÿ”จ Start coding!

๐Ÿ’ป Updating the Forked Repository

To ensure that the forked code stays updated, youโ€™ll need to add a Git remote pointing back to the original repository and create a local branch.

git remote add upstream https://github.com/neherlab/covid19_scenarios

To create and checkout a branch,

  1. Create and checkout a branch
git checkout -b <new branch name>
  1. Make changes to the files
  2. Commit your changes to the branch using git add and then git commit

๐Ÿ’ช Submitting changes using a Pull Request

To submit your code to the repository, you can submit a pull request.


๐Ÿ™ Acknowledgements

Initial development

Initially, the development was started in the Research group of Richard Neher at the Biozentrum, University of Basel (Basel, Switzerland) by Richard Neher (@rneher), Ivan Aksamentov (@ivan-aksamentov) and Nicholas Noll (@nnoll).

Jan Albert from Karolinska Institute (Stockholm, Sweden) had the initial idea to develop this tool and suggested features and parameters, and Robert Dyrdak provided initial parameter estimates.


Richard Neher
@rneher

Ivan Aksamentov
@ivan-aksamentov

Nicholas Noll
@nnoll

Jan Albert

Robert Dyrdak

Contributors โœจ

We are thankful to all our contributors, no matter how they contribute: in ideas, science, code, documentation or otherwise. Thanks goes to these wonderful people (emoji key):


Richard Neher

๐Ÿ’ป ๐Ÿ“– ๐Ÿ”ฃ ๐Ÿšง ๐Ÿ›ก๏ธ ๐Ÿ‘€

Ivan Aksamentov

๐Ÿ’ป ๐Ÿ“– ๐Ÿš‡ ๐Ÿšง ๐Ÿ’ฌ ๐Ÿ‘€

Nicholas Noll

๐Ÿ’ป ๐Ÿ“– ๐Ÿ”ฃ ๐Ÿšง ๐Ÿ‘€

Gavin Jefferies

๐Ÿ’ป ๐Ÿ“– ๐Ÿ”ฃ โš ๏ธ ๐Ÿ‘€

abrie

๐Ÿ’ป ๐Ÿ“– โš ๏ธ ๐Ÿ‘€

btoo

๐Ÿ’ป ๐Ÿ“– ๐Ÿšง

Rich Evans

๐Ÿ’ป ๐Ÿ“–

Jacob Smith

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿ‘€

Patrik Varga

๐Ÿ’ป ๐Ÿšง ๐Ÿ’ฌ

Sebastian Gierth

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿ‘€ ๐ŸŒ

Alexis Iglauer

๐Ÿ’ป ๐Ÿ”ฃ ๐Ÿšง

Joรซl

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿšง

Arnaud

๐Ÿ’ป ๐Ÿ‘€

Hannes Granstrรถm

๐Ÿ’ป ๐Ÿ’ฌ ๐ŸŒ

Rui Saraiva

๐Ÿ’ป ๐Ÿ“– ๐Ÿ’ฌ ๐Ÿšง

bharath6365

๐Ÿ’ป ๐Ÿ’ฌ

Andrew McKeever

๐Ÿ’ป ๐Ÿ’ฌ

Bruno RZN

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿ‘€

Danny Sepler

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿ‘€

Emmanuel Murillo Sรกnchez

๐Ÿ’ป ๐Ÿ’ฌ ๐ŸŒ

Igor Savin

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿ‘€

Ivรกn Yepes

๐Ÿ’ป ๐Ÿ’ฌ

Manuel Blechschmidt

๐Ÿ’ป ๐Ÿ’ฌ โš ๏ธ

Martin Vejmelka

๐Ÿ’ป ๐Ÿ’ฌ

Max Tarsis

๐Ÿ’ป ๐Ÿ’ฌ โš ๏ธ

Miguel Serrano

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿ“– ๐Ÿšง

Pete Bacon Darwin

๐Ÿ’ป ๐Ÿ’ฌ

Rachel Harvill

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿ“–

Rebecca Mullin

๐Ÿ’ป ๐Ÿ’ฌ

Rizky Maulana Nugraha

๐Ÿ’ป ๐Ÿšง

Rui Lima

๐Ÿ’ป ๐Ÿ’ฌ ๐ŸŒ

Victor Cordova

๐Ÿ’ป

aschelch

๐Ÿ’ป ๐Ÿ’ฌ ๐ŸŒ

joaopn

๐Ÿ’ป ๐ŸŒ

nono

๐Ÿ’ป ๐Ÿ’ฌ ๐ŸŒ

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT License

Copyright (c) 2020 neherlab

About

Models of COVID-19 outbreak trajectories and hospital demand

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.3%
  • JavaScript 7.9%
  • CSS 4.3%
  • Other 0.5%