InstituteforDiseaseModeling / synthpops

Licence: other
Create synthetic populations for COVID-19 epidemic analyses.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to synthpops

data2019nCoV
COVID-19 Pandemic Data R Package
Stars: ✭ 40 (+8.11%)
Mutual labels:  covid-19
folding-at-home
A Folding@Home Docker container with GPU support
Stars: ✭ 38 (+2.7%)
Mutual labels:  covid-19
COVID19Py
A tiny Python package for easy access to up-to-date Coronavirus (COVID-19, SARS-CoV-2) cases data.
Stars: ✭ 86 (+132.43%)
Mutual labels:  covid-19
COVID-19-US-State-Policy-Database
No description or website provided.
Stars: ✭ 60 (+62.16%)
Mutual labels:  covid-19
MLExp
arxiv.org/abs/1801.07710v2
Stars: ✭ 32 (-13.51%)
Mutual labels:  networks
us-covid19
Data repository of State's Health Department stats for COVID19 in the United States
Stars: ✭ 37 (+0%)
Mutual labels:  covid-19
covid-19
COVID-19 infectious forecasting using SEIR model and R0 estimation
Stars: ✭ 65 (+75.68%)
Mutual labels:  covid-19
CoronaTracker
A full stack framework to trace possible close-contact candidates within last specified days for an already detected covid-19 positive patient
Stars: ✭ 13 (-64.86%)
Mutual labels:  covid-19
awesome-social-distancing
😷 Collection of awesome resources, tools, and initiatives to alleviate loneliness, isolation, and other burdens imposed by "social distancing" measures.
Stars: ✭ 13 (-64.86%)
Mutual labels:  covid-19
Automated-Social-Distancing-Monitoring
automated social distancing monitoring system
Stars: ✭ 1 (-97.3%)
Mutual labels:  covid-19
covid-19-map
Monitoring coronavirus :(
Stars: ✭ 15 (-59.46%)
Mutual labels:  covid-19
instacart-delivery-slot-finder
Mac Script that notifies you once a delivery slot in available on Instacart
Stars: ✭ 18 (-51.35%)
Mutual labels:  covid-19
PM COVID
Public Available Code and Data to Reproduce Analyses in "Air pollution and COVID-19 mortality in the United States: Strengths and limitations of an ecological regression analysis."
Stars: ✭ 97 (+162.16%)
Mutual labels:  covid-19
covid-19-data
COVID-19 datasets are constructed entirely from primary (government and public agency) sources
Stars: ✭ 104 (+181.08%)
Mutual labels:  covid-19
covid19gr
Open Data Aggregation & Knowledge Base Repository for the evolution of the SARS-COV-2 pandemic in Greece.
Stars: ✭ 21 (-43.24%)
Mutual labels:  covid-19
covid19-mx-time-series
Time series data of the COVID-19 epidemic in Mexico
Stars: ✭ 36 (-2.7%)
Mutual labels:  covid-19
covid-alert
A privacy-preserving app for comparing last-known locations of coronavirus patients
Stars: ✭ 43 (+16.22%)
Mutual labels:  covid-19
covid-19-next
Offline Covid-19 stats
Stars: ✭ 17 (-54.05%)
Mutual labels:  covid-19
CoronaVirusDatabase
A repository for analyzing references and database of "gisanddata.maps.arcgis.com" website for Corona Virus.
Stars: ✭ 38 (+2.7%)
Mutual labels:  covid-19
noe
Booking and patient management system for drive-through virology testing. For a commercially supported solution, visit the CovidTMS website.
Stars: ✭ 15 (-59.46%)
Mutual labels:  covid-19

SynthPops

SynthPops is a module designed to generate synthetic populations that are used for COVID-19 (SARS-CoV-2) epidemic analyses. SynthPops can create generic populations with different network characteristics, as well as synthetic populations that interact in different layers of a multilayer contact network. Note: SynthPops is currently under active development and most features are fully tested and documented, but not all. We are in the process of expanding to include data and validation on additional regions beyond the original scope of the Seattle-King County region of Washington, USA. At the moment we have data for the following locations (in the synthpops/data folder) :

  • Seattle Metro, Washington, USA
  • Spokane County, Washington, USA
  • Franklin County, Washington, USA
  • Island County, Washington, USA
  • Dakar, Dakar Region, Senegal
  • Zimbabwe*
  • Malawi*
  • Nepal*

* Data for these locations are at the national scale. In the future, we hope to provide data at a more fine grained resolution for these locations.

The code was originally developed to explore the impact of contact tracing and testing in human contact networks in combination with our Covasim repository. This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.

More extensive installation and usage instructions are in the SynthPops documentation.

A scientific manuscript describing the model is currently in progress. If you use the model, in the mean time the recommended citation is:

SynthPops: a generative model of human contact networks. Mistry D, Kerr CC, Abeysuriya R, Wu M, Fisher M, Thompson A, Skrip L, Cohen JA, Althouse BM, Klein DJ (2021). (in preparation).

Installation

Python >=3.7, <3.9 is required. Python 2 is not supported. Virtual environments are strongly recommended but not required.

To install, first clone the GitHub repository:

git clone https://github.com/InstituteforDiseaseModeling/synthpops.git

Then install via:

python setup.py develop

Note: while synthpops can also be installed via pypi, this method does not currently include the data files which are required to function, and thus is not recommended. We recommend using Python virtual environments managed with Anaconda to help with installation. Currently, our recommended installation steps are:

  1. Install Anaconda.

  2. Working either in an existing conda environment or creating a new environment with Anaconda, install synthpops by navigating to the directory for this package and running python setup.py develop via terminal.

Quick Start

The following code creates and plots a the household layer of a synthetic population (using defaults for Seattle, Washington):

import synthpops as sp
import matplotlib.pyplot as plt

n = 10000 # how many people in your population
pop = sp.Pop(n) # create the population
pop.plot_contacts() # plot the contact matrix
plt.show() # display contact matrix to screen

Usage

In addition to the documentation, see the examples folder for usage examples.

Structure

All core modeling is in the synthpops folder; standard usage is import synthpops as sp.

data

The data folder contains demographic data used by the algorithms.

synthpops

The synthpops folder contains the library, including:

  • base.py: Frequently-used functions that do not neatly fit into other areas of the code base.
  • config.py: Methods to set general configuration options.
  • contact_networks.py: Functions to create a synthetic population with demographic data and places people into households, schools, and workplaces.
  • data_distributions.py: Functions for processing the data.
  • households.py: Functions for creating household contact networks.
  • ltcfs.py: Functions for creating long-term care facility contact networks.
  • plotting.py: Functions to plot age-mixing matrices.
  • pop.py: The Pop class, which is the foundation of SynthPops.
  • process_census.py: Functions to process US Census data.
  • sampling.py: Statistical sampling functions.
  • schools.py: Functions for creating school contact networks.
  • workplaces.py: Functions for creating workplace contact networks.

tests

The tests folder contains tests of different functions available in SynthPops.

Disclaimer

The code in this repository was developed by IDM to support our research in disease transmission and managing epidemics. We’ve made it publicly available under the Creative Commons Attribution-ShareAlike 4.0 International License to provide others with a better understanding of our research and an opportunity to build upon it for their own work. We make no representations that the code works as intended or that we will provide support, address issues that are found, or accept pull requests. You are welcome to create your own fork and modify the code to suit your own modeling needs as contemplated under the Creative Commons Attribution-Noncommercial-ShareAlike 4.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].