This release is a pre-release and may not be stable for production use.
population-exposure
population-exposure adds population estimates to hazard tables, polygons, and
raster cells.
Install
pip install population-exposure
Python 3.11 or newer is required.
What the result estimates
assign_population() returns the estimated population represented by the
selected source and reference year. Spatial hazards use coverage-weighted
allocation; table hazards use exact key joins. It does not identify observed
people, exact households, or who was present during an event. Boundary cells
contribute according to their covered area; finer output grids redistribute
source counts but do not add demographic detail.
Source meaning, resolution, modeling choices, and hazard scale limit local
inference.
For raster hazards, the conservation check is a numerical alignment check, not validation of the source and not an uncertainty interval. Report the source or release, population year and meaning, hazard date and threshold, allocation method, reprojection choice, incomplete support, and conservation difference when applicable.
Quick start
import pandas as pd
import population_exposure as pe
population_source = "illustrative counts"
population_year = "not applicable"
hazard = pd.DataFrame({"cell": ["A", "B"], "risk": ["high", "low"]})
population = pd.DataFrame({"cell": ["A", "B"], "population": [100, 200]})
exposed = pe.assign_population(hazard, population, cell_columns="cell")
print(f"{population_source} ({population_year}):")
print(exposed)
This toy table has no external population source or reference year. Replace it with a documented source and year for a real analysis.
Documentation
Read the full documentation for vector and raster workflows, population sources, and the API reference.
Project
Source code · Issue tracker · Contributing · Code of conduct · Changelog · MIT License
Metadata
Release files for population-exposure 0.1.0rc2
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 |
|---|---|---|---|---|
| population_exposure-0.1.0rc2.tar.gz | 2.8 MB | With provenance | Details for population_exposure-0.1.0rc2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| population_exposure-0.1.0rc2-py3-none-any.whl | Python 3 | none | any | Details for population_exposure-0.1.0rc2-py3-none-any.whl |
Total release size: 2.9 MB
Release files / population_exposure-0.1.0rc2.tar.gz
| Download URL | population_exposure-0.1.0rc2.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84da63fe7eaa83b265ccec5bef02b674412e233c692d663e4dcd9c6f69256381
|
|
BLAKE2b-256 checksum How to use checksums |
20a0dfb35de55178a35cf4f0ad3f6fee9f047e2a5f05af74f870ce63d6401182
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency logRelease files / population_exposure-0.1.0rc2-py3-none-any.whl
| Download URL | population_exposure-0.1.0rc2-py3-none-any.whl |
|---|---|
| Size | 60.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c9ccb935c2653be7666c957f4543f066ecc12d97b125065e922928b4dce28ad
|
|
BLAKE2b-256 checksum How to use checksums |
433cf2804fc3b12811df0e35cb85e3eac7c1de18584b319d14e79a7d8b014907
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency logSecurity for population-exposure 0.1.0rc2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for population_exposure-0.1.0rc2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency logA 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.