HESTIA Data Validation
Install
pip install hestia_earth_validation
Usage
from hestia_earth.validation.preload_requests import enable_preload
from hestia_earth.validation import validate
# enable request preloading
enable_preload()
# for each node, this will return a list containing all the errors/warnings (empty list if no errors/warnings)
errors = validate(nodes)
Note: if you want to validate existing data (with @type and @id fields), please set the following environment variable:
VALIDATE_EXISTING_NODES=true
Spatial validation
Some validations need geospatial data: whether a Site's coordinates fall inside the country or region it declares, how far outside they are, whether the region is small enough for the models to gap-fill, and whether the declared siteType matches the MODIS land cover there.
There are two ways to provide it, and either is enough:
# 1. the HESTIA Caching API, if it holds the land cover and GADM assets
VALIDATION_CACHING_API_URL=https://<host>/api
VALIDATION_CACHING_API_KEY=<token>
# 2. Earth Engine, which needs an account and credentials
pip install "hestia-earth-validation[spatial]"
The Caching API is preferred when it can answer, and anything it has no asset for still goes to Earth Engine — so the two combine rather than compete. MODELS_CACHING_API_* is read as a fallback for the variables above, which is what most deployments already set.
Set VALIDATE_SPATIAL=false to skip these validations entirely. Without either backend they are skipped anyway, with an error in the log: validating coordinates against data nobody can fetch would report every Site as being outside its own country.
Metadata
Release files for hestia-earth-validation 0.41.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hestia_earth_validation-0.41.7.tar.gz | 73.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hestia_earth_validation-0.41.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 159.0 kB
Release files / hestia_earth_validation-0.41.7.tar.gz
| Download URL | hestia_earth_validation-0.41.7.tar.gz |
|---|---|
| Size | 73.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0b1d4bfbab6a25de2106ce5d3a1de0c9749d2c227d64dd0b9619b846f3795e7
|
|
BLAKE2b-256 checksum How to use checksums |
3f8e63a5851de8b4e424f4aed033c6f0550ed1c9482f6d2609f5fa6fb960182b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / hestia_earth_validation-0.41.7-py3-none-any.whl
| Download URL | hestia_earth_validation-0.41.7-py3-none-any.whl |
|---|---|
| Size | 85.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2ae0efd87c4ef584a1cb3e662dec30832922c062e831db8d7bd5610d138aadf
|
|
BLAKE2b-256 checksum How to use checksums |
d2370c0c10e64b074a09d3509b5850ac2d471f356da2fff560a708ef8297d31d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|