Awesome Open Source
Awesome Open Source

COVID-19 Scenarios

Models of COVID-19 outbreak trajectories and hospital demand


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

License package.json version

Build status for production Build status for staging Known Vulnerabilities Security Headers badge Mozilla Observatory badge

DeepScan grade

Dependency Status Dependency Status Dev GitHub last commit GitHub commit activity GitHub contributors

Contributions: welcome Discussions are here

Twitter Follow

Got questions or suggestions?

Discussions are here

๐Ÿ” Discover

Simulator Source code repository Data directory 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 the 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 the /data directory. 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 individually 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.

๐Ÿ–ฅ๏ธ Developer's guide

Quick Start

Run natively

Install the requirements:

  • git >= 2.0
  • node.js >= 10 (we recommend installation through nvm or nvm-windows)
  • 1.0 < yarn < 2.0

Then in your terminal type:

git clone --recursive
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

Run in docker container

Install the requirements:

  • Docker > 19.0
  • docker-compose >= 1.25

Run docker-compose with docker/ file:

UID=$(id -u) docker-compose -f docker/ up --build

Variable UID should be set to your Unix user ID. On single-user setups these are usually 1000 on Linux and 523 on Mac.

Directory Structure

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

File or directory Contents
๐Ÿ“algorithims/ Algorithm's implementation
โ”œ๐Ÿ“„model.ts/ Model's implementation
โ”œ๐Ÿ“„run.ts/ Algorithm's entry point
๐Ÿ“assets/ Input data, images, and text assets
๐Ÿ“components/ React components
โ”œ๐Ÿ“Form/ Form components
โ”œ๐Ÿ“Main/ Simulator's UI main component implementation
| โ”œ๐Ÿ“Containment/ Containment widget
| โ”œ๐Ÿ“Results/ Results panel
| โ”œ๐Ÿ“Scenario/ Scenario panel
| โ”œ๐Ÿ“state/ Main component's state management (hooks)
| โ”œ๐Ÿ“validation/ Form validation
| โ”œ๐Ÿ“„Main.scss/
| โ”œ๐Ÿ“„Main.tsx/ Simulator's UI main component entry point
โ”œ๐Ÿ“„App.tsx/ App main component
๐Ÿ“locales/ Locales for translation
๐Ÿ“pages/ Application's pages
๐Ÿ“server/ Server that serves production build artifacts
๐Ÿ“state/ App state management (Redux and sagas)
๐Ÿ“styles/ Stylesheets
๐Ÿ“types/ Typescript typings
๐Ÿ“„index.ejs HTML template
๐Ÿ“„index.polyfilled.ts Entry point wrapper with polyfills
๐Ÿ“„index.tsx Real entry point
๐Ÿ“„links.ts Navbar links
๐Ÿ“„routes.ts Routes (URL-to-page mapping)

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)


The translation JSON files are in src/i18n/resources You can edit them directly or using GitLocalize. Here are the direct links to GitLocalize for each language that has translations currently:


The directory schemas/ contains JSON schemas which serve as a base for type checking, validation and serialization.

In particular, some of the types:

  • are generated from schemas for both Python (as classes) and Typescript (as interfaces)
  • are validated on runtime using corresponding libraries in these languages
  • are (when appropriate) serialized and deserialized using generated serialization/deserialized functions

We make emphasis on types that are shared across languages (e.g. Python to Typescript) as well as on types that participate in input-output (e.g. URLs, Local Storage, File I/O) and require particularly careful validation and serialization.

If you are planning to change one of the types that happens to be generated, you need to modify the corresponding schema first and them re-run the type generation.

See also:

Release cycle, continuous integration and deployment


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 to your local machine. You can use the URL of your repo inside git command, for example:

git clone<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

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

Ivan Aksamentov

Nicholas Noll

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):

Aditya Sharad

๐Ÿ’ป ๐Ÿ”ง

Agon Hasani

๐Ÿ’ป ๐Ÿ”ฃ

Alexis Iglauer

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

Andrew McKeever

๐Ÿ’ป ๐Ÿ’ฌ

Anson Chong

๐Ÿ’ป ๐ŸŽจ

Arkadiusz Goralski

๐Ÿ’ป ๐ŸŒ


๐Ÿ’ป ๐Ÿ‘€

Ashwin Gokhale


Bradley Betts

๐Ÿ’ป ๐Ÿ”ง

Bruno RZN

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

Christian Wienbruch

๐Ÿ’ป ๐Ÿ”ฃ


๐Ÿ’ป ๐Ÿ”ฃ

Danko Kozar

๐Ÿ’ป ๐ŸŽจ

Danny Sepler

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

Darรญo Hereรฑรบ

๐Ÿ“– ๐ŸŒ ๐Ÿ’ป ๐Ÿ”ฃ

David Hansen


Di Guan


Emmanuel Murillo Sรกnchez

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

Evan Krell

๐Ÿ’ป ๐Ÿ”ฃ

Fabio Zanini

๐Ÿ’ป ๐Ÿ”ฃ

Gabriel Homsi

๐Ÿ’ป ๐Ÿ”ฃ

Gavin Jefferies

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

Gustavo Ribeiro

๐Ÿ’ป ๐Ÿ”ฃ

Hannes Granstrรถm

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

Hui Xiang Chua

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

Igor Savin

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

Ivan Aksamentov

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

Ivรกn Yepes

๐Ÿ’ป ๐Ÿ’ฌ

Jacob Smith

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

Jill Adona

๐Ÿ’ป ๐Ÿ”ฃ

John Yani

๐Ÿ’ป ๐Ÿ”ฃ

Joram van den Boezem

๐Ÿ’ป ๐Ÿ”ฃ

Jose Eduardo Kimura

๐Ÿ’ป ๐ŸŽจ


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


๐Ÿ–‹ ๐ŸŒ

Kamil Bobrowski

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


๐Ÿ’ป ๐Ÿ”ฃ

Manuel Blechschmidt

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

Maoz Gelbart

๐Ÿ’ป ๐Ÿ”ฃ

Martin Vejmelka

๐Ÿ’ป ๐Ÿ’ฌ ๐Ÿ”ฃ

Max Tarsis

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

Mickey Pearce

๐Ÿ’ป ๐Ÿšง

Miguel Serrano

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

Mika Laaksonen

๐Ÿ’ป ๐ŸŽจ


๐Ÿ’ป ๐Ÿ”ฃ

Nataliya Karatkova

๐Ÿ’ป ๐ŸŽจ

Nathan Springman

๐Ÿ’ป ๐ŸŽจ

Nicholas Noll

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

Nils Ole Tippenhauer

๐Ÿ’ป ๐Ÿ”ฃ

Patrick Assaf

๐Ÿ’ป ๐ŸŽจ

Patrik Varga

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

Pete Bacon Darwin

๐Ÿ’ป ๐Ÿ’ฌ

Rachel Harvill

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

Rebecca Mullin

๐Ÿ’ป ๐Ÿ’ฌ

Rich Evans

๐Ÿ’ป ๐Ÿ“– ๐Ÿ”ฃ

Richard Neher

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

Rizky Maulana Nugraha

๐Ÿ’ป ๐Ÿšง

Rui Lima

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

Rui Saraiva

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


๐Ÿ“– ๐Ÿ–‹

Sebastian Gierth

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


๐Ÿ’ป ๐Ÿ”ฃ ๐Ÿค”



Thomas Eckert

๐Ÿ’ป ๐Ÿ“–

Tryggvi Gylfason

๐Ÿ’ป ๐ŸŽจ

Valentin Druelle

๐Ÿ’ป ๐Ÿ”ฃ ๐Ÿค” ๐Ÿ“ข

Victor Cordova

๐Ÿ’ป ๐ŸŽจ

William Hiver

๐Ÿ’ป ๐ŸŒ


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


๐Ÿ’ป ๐Ÿ”ฃ


๐Ÿ’ป ๐ŸŽจ


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


๐Ÿ’ป ๐Ÿ’ฌ


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




๐Ÿ’ป ๐ŸŒ


๐Ÿ’ป ๐ŸŽจ


๐Ÿ’ป ๐Ÿ”ฃ


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


๐Ÿ’ป ๐Ÿ”ฃ ๐ŸŽจ


๐Ÿ’ป ๐ŸŽจ


๐Ÿ’ป ๐ŸŽจ

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


MIT License

Copyright (c) 2020 neherlab

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (66,517)ย 
open-source (691)ย 
data (355)ย 
opensource (273)ย 
simulation (220)ย 
research (177)ย 
covid-19 (146)ย 
science (135)ย 
model (105)ย 
coronavirus (92)ย 
covid (27)ย 
sars-cov-2 (20)ย 
ncov (16)ย 
modelling (15)ย 

Find Open Source By Browsing 7,000 Topics Across 59 Categories

Advertising ๐Ÿ“ฆ10
All Projects
Application Programming Interfaces ๐Ÿ“ฆ124
Applications ๐Ÿ“ฆ192
Artificial Intelligence ๐Ÿ“ฆ78
Blockchain ๐Ÿ“ฆ73
Build Tools ๐Ÿ“ฆ113
Cloud Computing ๐Ÿ“ฆ80
Code Quality ๐Ÿ“ฆ28
Collaboration ๐Ÿ“ฆ32
Command Line Interface ๐Ÿ“ฆ49
Community ๐Ÿ“ฆ83
Companies ๐Ÿ“ฆ60
Compilers ๐Ÿ“ฆ63
Computer Science ๐Ÿ“ฆ80
Configuration Management ๐Ÿ“ฆ42
Content Management ๐Ÿ“ฆ175
Control Flow ๐Ÿ“ฆ213
Data Formats ๐Ÿ“ฆ78
Data Processing ๐Ÿ“ฆ276
Data Storage ๐Ÿ“ฆ135
Economics ๐Ÿ“ฆ64
Frameworks ๐Ÿ“ฆ215
Games ๐Ÿ“ฆ129
Graphics ๐Ÿ“ฆ110
Hardware ๐Ÿ“ฆ152
Integrated Development Environments ๐Ÿ“ฆ49
Learning Resources ๐Ÿ“ฆ166
Legal ๐Ÿ“ฆ29
Libraries ๐Ÿ“ฆ129
Lists Of Projects ๐Ÿ“ฆ22
Machine Learning ๐Ÿ“ฆ347
Mapping ๐Ÿ“ฆ64
Marketing ๐Ÿ“ฆ15
Mathematics ๐Ÿ“ฆ55
Media ๐Ÿ“ฆ239
Messaging ๐Ÿ“ฆ98
Networking ๐Ÿ“ฆ315
Operating Systems ๐Ÿ“ฆ89
Operations ๐Ÿ“ฆ121
Package Managers ๐Ÿ“ฆ55
Programming Languages ๐Ÿ“ฆ245
Runtime Environments ๐Ÿ“ฆ100
Science ๐Ÿ“ฆ42
Security ๐Ÿ“ฆ396
Social Media ๐Ÿ“ฆ27
Software Architecture ๐Ÿ“ฆ72
Software Development ๐Ÿ“ฆ72
Software Performance ๐Ÿ“ฆ58
Software Quality ๐Ÿ“ฆ133
Text Editors ๐Ÿ“ฆ49
Text Processing ๐Ÿ“ฆ136
User Interface ๐Ÿ“ฆ330
User Interface Components ๐Ÿ“ฆ514
Version Control ๐Ÿ“ฆ30
Virtualization ๐Ÿ“ฆ71
Web Browsers ๐Ÿ“ฆ42
Web Servers ๐Ÿ“ฆ26
Web User Interface ๐Ÿ“ฆ210