Skip to main content

HESTIA Data Validation

Pipeline Status Coverage Report Documentation Status

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hestia_earth_validation-0.40.6.tar.gz (69.8 kB view details)

Uploaded Source

Built Distribution

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

hestia_earth_validation-0.40.6-py3-none-any.whl (82.4 kB view details)

Uploaded Python 3

File details

Details for the file hestia_earth_validation-0.40.6.tar.gz.

File metadata

  • Download URL: hestia_earth_validation-0.40.6.tar.gz
  • Upload date:
  • Size: 69.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for hestia_earth_validation-0.40.6.tar.gz
Algorithm Hash digest
SHA256 f79335195f347855373c0de01ac914e97883a704002863c33af9647e85a7f395
MD5 f66370766a47af4a92d0be315285435c
BLAKE2b-256 aec9e11345fdbf279127b40ac555cf2e6f2cd8d1e61849c82f5944cc24cf8640

See more details on using hashes here.

File details

Details for the file hestia_earth_validation-0.40.6-py3-none-any.whl.

File metadata

File hashes

Hashes for hestia_earth_validation-0.40.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d0b05b27e58bdd63f14434299f84028790af1126b90e4fac68885482ed4587f4
MD5 517dc8ef6feb2e0da7c804851f21636b
BLAKE2b-256 12b71feeb4700f88597a36c06e54c54b69510654d81b95c70f245ee69787ad13

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

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