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.0.tar.gz (70.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.41.0-py3-none-any.whl (83.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hestia_earth_validation-0.41.0.tar.gz
  • Upload date:
  • Size: 70.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.41.0.tar.gz
Algorithm Hash digest
SHA256 829fc2f6e8e8983d995522d62dd293e2b919220763caba462796f3c58f1fc602
MD5 0e723ae8e1116fe1a74e1a6700306e11
BLAKE2b-256 01253f4b31703e30e0d5bba321d3a63b58fc82175ea848cd65442e8a1ee8c466

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hestia_earth_validation-0.41.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b341832ce86305215e38de474207e4533f80add4ff2d5949e265d6fb5865e094
MD5 f3e8bd56aa27980733a0085a847efb26
BLAKE2b-256 9d79232a3dfe80cf6beacb94697c14608fb508d30f805ff92dbeda7f750bc021

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