Skip to main content

Calculate birthrate and mortality from WPP data

Project description

pyvd

pyvd calculates birth and mortality rates from UN WPP projections for a single country.

Basic usage

  1. Install
pip install pyvd
  1. In a python terminal or script, calculate demography (e.g., birth rates by year)
pop_input = make_pop_dat('IND')
year_vec = pop_input[0, :] - pyvd.constants.BASE_YEAR
year_init = pyvd.constants.BASE_YEAR - pyvd.constants.BASE_YEAR
pop_mat = pop_input[1:, :] + 0.1
pop_init = [np.interp(year_init, year_vec, pop_mat[idx, :])
            for idx in range(pop_mat.shape[0])]
vd_tup = demog_vd_calc(year_vec, year_init, pop_mat, pop_init)

More about the data

You can learn about the data here. We combine both the retrospective (past) and projection (future) estimate, using the medium variant for the projects.

Coming soon

  • Subnational estimates

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

pyvd-0.4.5.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvd-0.4.5-py3-none-any.whl (2.9 MB view details)

Uploaded Python 3

File details

Details for the file pyvd-0.4.5.tar.gz.

File metadata

  • Download URL: pyvd-0.4.5.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyvd-0.4.5.tar.gz
Algorithm Hash digest
SHA256 9a03aadb0559f2c6479b260489d7a2a69a58f906c287034bec53e874758b6a69
MD5 f19efa4cd1dcae1f249b113725c13cd1
BLAKE2b-256 abe728ccb4c33935d3282d5e2f5e2284ce4838a9f8e7eb688ce50d82057b5097

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvd-0.4.5.tar.gz:

Publisher: publish_pypi.yml on krosenfeld-IDM/pyvd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvd-0.4.5-py3-none-any.whl.

File metadata

  • Download URL: pyvd-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pyvd-0.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a84dd067cce6face114f34031ded7bb90b573692add0aa4d054c27fd13459825
MD5 838b4add5b23e59c357b961cc83176c6
BLAKE2b-256 87df7d3080ac50ede1a96751d0d626f7ac7c55ba99db5a1dfbf3d2f1f375426d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvd-0.4.5-py3-none-any.whl:

Publisher: publish_pypi.yml on krosenfeld-IDM/pyvd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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