Skip to main content

vaccontrib

Code to quantify the contributions unvaccinated and vaccinated subpopulations make towards the effectie reproduction number and new infections.

>>> from vaccontrib.covid import get_reduced_vaccinated_susceptible_contribution_matrix_covid
>>> R0 = 6
>>> C = get_reduced_vaccinated_susceptible_contribution_matrix_covid(R0,variant='delta')
>>> C/C.sum()
array([[0.38159051, 0.17360365],
       [0.28493897, 0.15986686]])

Also, check out the tutorial notebook and an explanatory notebook including stochastic simulations.

Install

git clone git@github.com:benmaier/vaccontrib.git
pip install ./vaccontrib

vaccontrib was developed and tested for

  • Python 3.6

  • Python 3.7

  • Python 3.8

So far, the package’s functionality was tested on Mac OS X and CentOS only.

Dependencies

vaccontrib directly depends on the following packages which will be installed by pip during the installation process

  • numpy>=1.17

  • matplotlib>=3.3

  • bfmplot>=0.0.11

Manuscript

Results found using this software package were reported in a preprint. To replicate the results, use the scripts in the paper_analysis directory. E.g. to get a comprehensive overview of results for a parameterset, run

python compute.py DIRNAME1 DIRNAME2

e.g.

python compute.py 00_lower 01_upper

See the help text:

usage: compute.py [-h] [-u RU] [-v RV] [-f] [-R R0] dirs [dirs ...]

Compute contribution matrices.

positional arguments:
  dirs                directories for which contributions matrices should be computed

optional arguments:
  -h, --help          show this help message and exit
  -u RU, --Ru RU      Base R-value of unvaccinated
  -v RV, --Rv RV      Base R-value of vaccinated
  -f, --save-figures  create, show, and save illustrations
  -R R0, --R0 R0      Base R0 to which the contribution will be scaled

Make sure you have numpyarray_to_latex installed.

Changelog

Changes are logged in a separate file.

License

This project is licensed under the MIT License. Note that this excludes any images/pictures/figures shown here or in the documentation.

Contributing

If you want to contribute to this project, please make sure to read the code of conduct and the contributing guidelines. In case you’re wondering about what to contribute, we’re always collecting ideas of what we want to implement next in the outlook notes.

Contributor Covenant

Dev notes

Fork this repository, clone it, and install it in dev mode.

git clone git@github.com:YOURUSERNAME/vaccontrib.git
make

If you want to upload to PyPI, first convert the new README.md to README.rst

make readme

It will give you warnings about bad .rst-syntax. Fix those errors in README.rst. Then wrap the whole thing

make pypi

It will probably give you more warnings about .rst-syntax. Fix those until the warnings disappear. Then do

make upload

Metadata

Release files for vaccontrib 0.0.1

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

Source distribution (sdist)

Source distribution for vaccontrib 0.0.1
File Size Uploaded
vaccontrib-0.0.1.tar.gz 27.4 kB Details

Release files / vaccontrib-0.0.1.tar.gz

Download URL vaccontrib-0.0.1.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bf41be211c7c96f389b6cece91eb78c2629b8b11491a395e80b8925cf08f8021
BLAKE2b-256 checksum
How to use checksums
5d3a7a0bc53ea8a39e9f92d1f23b19241a3d76ee663ceedb83df22b7093bc790
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/54.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.9

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file

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