Skip to main content

Epidemiological weeks calculation based on the US CDC (MMWR) and ISO week numbering systems

Project description

epiweeks

A Python package to calculate epidemiological weeks using the US CDC (MMWR) and ISO week numbering systems.

Build Status Coverage Status Code Quality Docs Status PyPI Downloads PyPI Version Conda Version Package License

Features

  • Support for both the US CDC (MMWR) and ISO week numbering systems.
  • Accurate and tested calculations.
  • Intuitive, clean, and easy-to-use interface.
  • Calculation of the start and end dates of weeks.
  • Iteration of year's weeks or week's dates.
  • Rich comparison between weeks.
  • Logical operations for weeks (addition, subtraction and containment).
  • Validation of input data.
  • Works on Python 3.6+ with zero dependencies.
  • Thoroughly tested with 100% test coverage.

Installation

To install using pip, run:

pip install epiweeks

To install using conda, run:

conda install -c bioconda epiweeks

Basic Usage

from epiweeks import Week, Year

week = Week(2019, 1)
print(week.enddate())
# 2019-01-05

for week in Year(2019).iterweeks():
    print(week.enddate())
# 2019-01-05
# 2019-01-12
# ...
# 2019-12-21
# 2019-12-28

Documentation

Please see https://epiweeks.readthedocs.io for full documentation of this package, including background, more usage examples and API reference.

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epiweeks-2.1.4.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

epiweeks-2.1.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file epiweeks-2.1.4.tar.gz.

File metadata

  • Download URL: epiweeks-2.1.4.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for epiweeks-2.1.4.tar.gz
Algorithm Hash digest
SHA256 f2d13b2b704d877e92b3b67f7d002e1dd9d73ab0e29a54fedfc12eae6585428f
MD5 cb800fab6b15d450adc33bdaaf42639d
BLAKE2b-256 e0a5bcfcc132544cb8670995031e6998e60db95a0a64b5b39e17d5e78b918655

See more details on using hashes here.

File details

Details for the file epiweeks-2.1.4-py3-none-any.whl.

File metadata

  • Download URL: epiweeks-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for epiweeks-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0833b8b150b3ac22b1628e549e55e0e613cd2fb79a928193216285e9e370bd4c
MD5 d476cef53583ba7812400412c8b2a91a
BLAKE2b-256 6da6b83a3f8a206f329abd2695dd694a7ead8ee9ce3cdf3a79fabcf9dfb71511

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page