Skip to main content

dhidb

PyPI version CI and release DHIDB Tutorial

dhidb provides read-only Python access to a global 300 m, 12-year (2014-2025) Dynamic Habitat Indices time series stored as a dense TileDB array on public S3-compatible object storage. It supports point, bounding-box, and polygon queries without first downloading the complete database.

DHIs are widely used in spatial ecology as interpretable predictors of habitat quality and vegetation dynamics, including covariates in species distribution models (SDMs) and biodiversity assessments.

Installation

pip install dhidb

For development:

python -m pip install -e ".[test]"

Requirements and optional dependencies

DHIDB requires Python 3.10 or newer. The runtime dependencies and the compatibility ranges published by the package are:

Dependency Supported version range
affine >=2.4
numpy >=1.26,<3
pandas >=2.1
pyproj >=3.6
rasterio >=1.3
shapely >=2.0
tiledb >=0.35,<0.38
xarray >=2024.1

Optional features are installed with package extras. There is no generic dhidb[dependency] extra; use the feature-specific extra you need:

Extra Install command Adds
netcdf pip install "dhidb[netcdf]" scipy>=1.11 for NetCDF export
zarr pip install "dhidb[zarr]" zarr>=2.18 for Zarr export
test pip install "dhidb[test]" build, pytest, coverage, Ruff, and SciPy tooling

For local development and testing:

python -m pip install -e ".[test,netcdf,zarr]"

The documentation website has its own Node.js dependencies in website/package.json; they are not part of the Python package extras.

Quick start

from dhidb import DHIProvider

with DHIProvider() as db:
    print(db.years)
    print(db.variables)

    for batch in db.iter_bbox(
        bounds=(12.25, 51.25, 12.50, 51.40),  # Leipzig, Germany
        years=range(2014, 2026),
        variables=["dhi_cum", "dhi_min", "dhi_var", "valid_count"],
        batch_shape={"y": 256, "x": 256},
    ):
        print(batch.sizes)

Documentation

The Docusaurus website source is in website/. Build it locally with:

npm --prefix website install
npm --prefix website run start

Data variables

Variable Meaning Unit
dhi_cum Cumulative productivity from LSP TPROD PPI integral (m2 m-2 day)
dhi_min Minimum seasonal productivity baseline from LSP MINV PPI (m2 m-2)
dhi_var Inter-period GPP coefficient of variation dimensionless
dhi_combined Normalized combined DHI, where available dimensionless
observed_count Number of available 10-day observations scenes
valid_count Number of accepted 10-day observations scenes
qflag_any_count Observations carrying any source quality flag scenes
qflag_rejected_count Observations rejected by quality filtering scenes

License

MIT

Metadata

Release files for dhidb 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dhidb 0.3.6
File Size Uploaded
dhidb-0.3.6.tar.gz 43.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dhidb 0.3.6
File Interpreter ABI Platform
dhidb-0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 43.7 MB

Release files / dhidb-0.3.6.tar.gz

Download URL dhidb-0.3.6.tar.gz
Size 43.7 MB
Tags Source
SHA-256 checksum
How to use checksums
03b113c03d7260dfb85a71a954abef067eae8dfed4ebca50dba9bf570f7a36da
BLAKE2b-256 checksum
How to use checksums
74919968fd1292c176068ae64589a6793a5f4b197d3822b5cc5a06e4c946ce20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / dhidb-0.3.6-py3-none-any.whl

Download URL dhidb-0.3.6-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10665d763408c17408c7dff1caf9b41a1ad628156bf2cf445e97fa2a54b07e03
BLAKE2b-256 checksum
How to use checksums
fad6169350929b99feac6b06becf674337128ab19602d45ca0121fd76b0eb919
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.3.6 This release

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page