Skip to main content

Imagel

PyRossGeo: spatially resolved infectious disease models in Python Binder CI PyPI Python Version

About | Model | Installation | Documentation | License | Contact

About

PyRossGeo is a numerical library for spatially resolved mathematical modelling of infectious diseases. The library has a Python interface, but is coded in C using Cython. See below for more details on the model.

PyRoss is a companion library that offers tools for both deterministic and stochastic simulation of macroscopic compartmental models, as well as a complete suite of inference and optimal control tools.

Please open an issue, or join our public slack, if you have any queries, in preference to e-mailing us. For urgent enquiries, please contact Lukas Kikuchi at ltk26@cam.ac.uk.

The authors are part of the Rapid Assistance in Modelling the Pandemic (RAMP) taskforce at the University of Cambridge. In alphabetical order, we are: Jakub Dolezal, Tim Ekeh, Lukas Kikuchi, Hideki Kobayashi, Paul Rohrbach, Rajesh Singh and Fernando Caballero.

Model

The PyRossGeo uses a spatially resolved infectious disease model. The model is distinct from other network-SIR models in that it explicitly considers movement between geographical nodes, by modelling the commuting patterns of the population.

Locally at each geographical node, we simulate compartmental epidemiological dynamics with an age-contact structure. The resident population at each node can move between nodes via the commuter network. The epidemics of the commute itself is modelled using the "commuterverse": People moving between geographical nodes must spend the requisite amount of time (corresponding to the distance travelled) with their fellow commuters in a commuter node. See the figure below for an example of a commuter network:

The local infective dynamics at a node-level is customizable, and any variant of the compartmental epidemiological models (e.g. SIR, SEIR, SEAIR, etc.) can be coded using a configuration file.

The model has been tested with synthetic data on London, at an MSOA (Middle Super Output Area) level. We used ~1000 geographical nodes, with a commuter network of ~300'000 edges, constructed using the 2011 UK Census data. We are currently developing a test for a UK-wide simulation at an LAD (Local Authority District) level.

For a more detailed description of the model, please read this.

Installation

You can take PyRossGeo for a spin without installation: Binder. Please be patient while Binder loads.

From a checkout of this repository

Install PyRossGeo and required dependencies using

>> git clone https://github.com/lukastk/PyRossGeo.git
>> cd PyRossGeo
>> pip install -r requirements.txt
>> python setup.py install

Via Anaconda

Install PyRossGeo and its dependencies in a pyrossgeo environment

>> git clone https://github.com/lukastk/PyRossGeo.git
>> cd PyRossGeo
>> make env
>> conda activate pyrossgeo
>> make

Via pip

Install the latest PyPI version

>> pip install pyrossgeo

PyRossGeo requires the following software

Documentation

See here for documentation, tutorials and example notebooks.

License

We believe that openness and sharing improves the practice of science and increases the reach of its benefits. This code is released under the MIT license. Our choice is guided by the excellent article on Licensing for the scientist-programmer.

Contact

For inquiries about PyRossGeo, please join the #pyrossgeo channel of our public slack here.

Metadata

Release files for pyrossgeo 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrossgeo 1.0.8
File Size Uploaded Provenance
pyrossgeo-1.0.8.tar.gz 1.0 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyrossgeo 1.0.8
File Interpreter ABI Platform
pyrossgeo-1.0.8-cp37-cp37m-macosx_10_9_x86_64.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 Details

Total release size: 4.2 MB

Release files / pyrossgeo-1.0.8.tar.gz

Download URL pyrossgeo-1.0.8.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
fa0b8927ac6f03a07aeff6235381893443ea556809394e154d2ab58c78ea1e7e
BLAKE2b-256 checksum
How to use checksums
4bbb926d18085e6b6114200abb64ba1501411a065806ee47d3b7050a487f1127
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

Release files / pyrossgeo-1.0.8-cp37-cp37m-macosx_10_9_x86_64.whl

Download URL pyrossgeo-1.0.8-cp37-cp37m-macosx_10_9_x86_64.whl
Size 3.1 MB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
d40261c55b04c21690331a672373445d45c0521acf53d31c29b94e36ea303261
BLAKE2b-256 checksum
How to use checksums
72ac1a3b791875d3bce71f0eb466145129dcec841f920da9610d5818c29ef45f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3

Security for pyrossgeo 1.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page