Dhis2eo is a small, focused Python library for DHIS2 users who want to integrate earth observation and climate data into their workflows. It provides lightweight helpers and tools bridging the Python geoscience and DHIS2 ecosystems.
The purpose of dhis2eo is to help DHIS2 users incorporate earth observation and climate data into their workflows without adding unnecessary complexity. It focuses on the intersection of DHIS2 and geoscience rather than trying to be a full earth observation library.
Key points about dhis2eo:
-
Integration with earth observation tools: Dhis2eo is a thin utility layer that connects DHIS2 workflows with climate data sources and geospatial libraries like xarray and earthkit. It provides helpers for common climate and earth observation tasks while avoiding the overhead of a full-featured earth observation or geospatial library.
-
Generic functionality across local and national contexts: Dhis2eo is designed to provide generic solutions for DHIS2 users worldwide, while also allowing users to extract and work with data relevant to specific country contexts.
-
Data translation for DHIS2: Dhis2eo supports translating between DHIS2 and earth observation domains, including conversion of data formats and values. It is not meant for general interaction with DHIS2; for that, use the separately maintained dhis2-python-client.
More generally, dhis2eo as a library is meant to be:
- Easy to read
- Easy to run
- Easy to maintain
- Easy to integrate into other projects
This leads to a few guiding principles:
-
Fewer things over more things: Every new function, dependency, or tool has a long-term cost.
-
Core libraries over wrappers: If something can be done directly with xarray, earthkit, or standard Python, we usually prefer that over adding a dhis2eo wrapper.
-
Keep it simple: Code should be short, easy to read, debug, and explain to someone new to the project.
-
Lightweight Python tooling: The project is designed to be easy for developers to install, test, and run, with minimal extra dependencies and broad support across operating systems and Python versions.
These principles help keep the project approachable and durable over time.
Until we make the first Github release, just install from the main Github repo:
pip install git+https://github.com/dhis2/dhis2eoFor contributors (to get linting and testing tools):
pip install -e ".[dev]"Tests are written with pytest and can be run directly:
pytest -vTo avoid unnecessary computation and server load, tests for the data integrations are marked with @pytest.mark.integration and are skipped by default. To run them manually:
pytest -v -m integrationCode style and linting are handled by ruff and can be run directly:
ruff check .
ruff format .Contributions are welcome, whether they are bug fixes, improvements, or new features.
When contributing, please try to align with the design philosophy above. In particular, we aim to keep:
- The public API small
- Dependencies minimal
- Tooling simple and standard