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.41.1.tar.gz (71.3 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.41.1-py3-none-any.whl (83.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hestia_earth_validation-0.41.1.tar.gz
  • Upload date:
  • Size: 71.3 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.41.1.tar.gz
Algorithm Hash digest
SHA256 13c72a70f39f86a83495ac2191591e4af81d8959efa37d7625387e3c12e9c1a7
MD5 238d6014529665c32fd6b066b140aee7
BLAKE2b-256 3fcc1bcefcce1aa451de40c69c8ec0f67679bf57bf6eb3a5651f3ea37fbf1f4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hestia_earth_validation-0.41.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d241ba10b03b4110265c7a255dafad6d226509e9caff9006b94c407613fed4a
MD5 95234714697331cd636b1d025d52565a
BLAKE2b-256 3ce4cef1585217f01a46e0235e953934fb719c49ec8a423c55a1795ca0ad53af

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