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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file population_exposure-0.1.0rc2.tar.gz.
File metadata
- Download URL: population_exposure-0.1.0rc2.tar.gz
- Upload date:
- Size: 2.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84da63fe7eaa83b265ccec5bef02b674412e233c692d663e4dcd9c6f69256381
|
|
| MD5 |
a7526089bbfbc8ab8e47dbbf96dbf91d
|
|
| BLAKE2b-256 |
20a0dfb35de55178a35cf4f0ad3f6fee9f047e2a5f05af74f870ce63d6401182
|
Provenance
The following attestation bundles were made for population_exposure-0.1.0rc2.tar.gz:
Publisher:
publish.yml on palewire/population-exposure
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
population_exposure-0.1.0rc2.tar.gz -
Subject digest:
84da63fe7eaa83b265ccec5bef02b674412e233c692d663e4dcd9c6f69256381 - Sigstore transparency entry: 2676341985
- Sigstore integration time:
-
Permalink:
palewire/population-exposure@9aa3d2a73ad43b9975184ff41de40e44a61766aa -
Branch / Tag:
refs/tags/v0.1.0rc2 - Owner: https://github.com/palewire
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9aa3d2a73ad43b9975184ff41de40e44a61766aa -
Trigger Event:
release
-
Statement type:
File details
Details for the file population_exposure-0.1.0rc2-py3-none-any.whl.
File metadata
- Download URL: population_exposure-0.1.0rc2-py3-none-any.whl
- Upload date:
- Size: 60.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c9ccb935c2653be7666c957f4543f066ecc12d97b125065e922928b4dce28ad
|
|
| MD5 |
92a75fded03eca6351c2d9923c5d5649
|
|
| BLAKE2b-256 |
433cf2804fc3b12811df0e35cb85e3eac7c1de18584b319d14e79a7d8b014907
|
Provenance
The following attestation bundles were made for population_exposure-0.1.0rc2-py3-none-any.whl:
Publisher:
publish.yml on palewire/population-exposure
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
population_exposure-0.1.0rc2-py3-none-any.whl -
Subject digest:
4c9ccb935c2653be7666c957f4543f066ecc12d97b125065e922928b4dce28ad - Sigstore transparency entry: 2676342021
- Sigstore integration time:
-
Permalink:
palewire/population-exposure@9aa3d2a73ad43b9975184ff41de40e44a61766aa -
Branch / Tag:
refs/tags/v0.1.0rc2 - Owner: https://github.com/palewire
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9aa3d2a73ad43b9975184ff41de40e44a61766aa -
Trigger Event:
release
-
Statement type: