dhidb 
dhidb provides read-only Python access to the global 300 m Dynamic Habitat
Indices database 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)
germany = db.query_bbox(
bounds=(5.8, 47.2, 15.1, 55.1),
years=[2020, 2021, 2022],
variables=["dhi_cum", "dhi_min", "dhi_var", "valid_count"],
)
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dhidb-0.2.5.tar.gz.
File metadata
- Download URL: dhidb-0.2.5.tar.gz
- Upload date:
- Size: 35.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a706a3939d696c033eb75cb1a9213e003ed87f449f603ddc9d305e1eff999b7b
|
|
| MD5 |
26408a4d23861f285de4ef6b3f697ce5
|
|
| BLAKE2b-256 |
e0a5fd52aa7fc7bbf0bdd8e5b6a6cba36a0343815afb23a300360193a029104c
|
File details
Details for the file dhidb-0.2.5-py3-none-any.whl.
File metadata
- Download URL: dhidb-0.2.5-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e45f8b9154d7ec9e4874df401d58b5d2c8c8b01639c41cf6c1745c1cf5e461fa
|
|
| MD5 |
7fe8170a038f78eab7c66e7fc2a7c298
|
|
| BLAKE2b-256 |
e384e69c5cbc5d51caa10994dd2a1d7d62896bd5a5424b52de3384cd22aca253
|