项目作者: dralshehri

项目描述 :
Epidemiological weeks based on the CDC (MMWR) and ISO week numbering systems
高级语言: Python
项目地址: git://github.com/dralshehri/epiweeks.git
创建时间: 2018-11-28T10:12:08Z
项目社区:https://github.com/dralshehri/epiweeks

开源协议:MIT License

下载


EpiWeeks

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

Release Status
Coverage Status
[Code Quality][quality]
Docs Status
PyPI Downloads
PyPI Version
Conda Version
Package License

[quality]:
https://www.codefactor.io/repository/github/dralshehri/epiweeks/overview/main

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.8+ with zero dependencies.
  • Thoroughly tested with 100% test coverage.

Installation

To install using pip, run:

  1. pip install epiweeks

To install using conda, run:

  1. conda install -c bioconda epiweeks

Basic Usage

  1. from epiweeks import Week, Year
  2. week = Week(2019, 1)
  3. print(week.enddate())
  4. # 2019-01-05
  5. for week in Year(2019).iterweeks():
  6. print(week.enddate())
  7. # 2019-01-05
  8. # 2019-01-12
  9. # ...
  10. # 2019-12-21
  11. # 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.