pyCOCAP
pyCOCAP is the Python interface to the common COCAP database. You can find the documentation here
Installation
Using the Package Installer for Python PIP, you can install this interface with following command
pip install pycocap
Usage
Once the package is installed it is as easy as this to get the COCAP data for example the reported case numbers for Sweden and the stringency index for the UK.
import pycocap as pyc
cases = pyc.cases('Sweden')
npi = pyc.npi('United Kingdom', 'stringency')
If you want to get multiple NPIs into one DataFrame, you can do following
npis = pyc.npis('Germany', ['school closing', 'dept relief', 'facial coverings'])
Defining the start and end dates of the timeseries can be done with Python's
standard date objects
from datetime import date
deaths = pyc.death('Canada', start_date=date(2020, 5, 16), end_date=date(2021, 1, 15))
You can also use this to expand the timeseries and at the same time choose with which value to fill gaps
deaths = pyc.death('Canada', start_date=date(2019, 11, 1), fill_value=0)
Documentation
You can find the documentation here
Requirements
Contact
You can get in touch with me via e-mail or have a look at the source code and open issues there.
Metadata
Release files for pycocap 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycocap-1.3.3.tar.gz | 2.1 MB | Without provenance | Details for pycocap-1.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycocap-1.3.3-py3-none-any.whl | Python 3 | none | any | Details for pycocap-1.3.3-py3-none-any.whl |
Total release size: 2.1 MB
Release files / pycocap-1.3.3.tar.gz
| Download URL | pycocap-1.3.3.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d16bb0342ef12d86445f40599d0fc85e86229528146ffc79f45c6175019d97c2
|
|
BLAKE2b-256 checksum How to use checksums |
818de83cd2d26d0ff8290efab95864281ffd7b16cdf9f94e66eabce83d3a1ec4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / pycocap-1.3.3-py3-none-any.whl
| Download URL | pycocap-1.3.3-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00d5cc5100443ad53af5d1b98fcb171709ee2a0d27a9bb7a2956b16d3fde34cc
|
|
BLAKE2b-256 checksum How to use checksums |
570498b5a42539b230075941236f79a355ee726b8c2596324487579726934d47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for pycocap 1.3.3
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.