Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just to check if it was easy to reuse components from
datasetsmodule to add a temporal reduce process, to perform temporal aggregation of a raster dataset to a given period. Just for testing purposes, the process returns a rendered map image of the reduced raster.Example output for December 2025 and Brazil:
Performance and integration with tiling and org unit aggregation
Even when reducing ERA5-Land hourly temperature data to a full month of a very large country like Brazil, results are near instant (at least less than 1 second which includes rendering). Most countries should be much faster. A whole year for Sierra Leone was near instant.
This means that temporal aggregation is very fast and can be leveraged in a dynamic tiles endpoint, so that the time aggregated raster is generated for the whole country and saved to a temporary file on the fly (this is what should take <1s for all of Brazil and even faster for most countries, and can be cached for a short time), and then redirecting to TiTiler for dynamic tiles pointing to the time aggregated temporary file.
Can also be leveraged to do the temporal aggregation for many time periods prior to org unit aggregation. Already implemented separately in the FastAPI endpoint
datasets/ID/PERIOD_TYPE/orgunits.Reproducing
Make sure you sync your environment with the latest packages to install the necessary
zarrPython package. To reproduce, follow these steps to download the data and build the zarr file using the/datasetsendpoints (has not yet been integrated with the rest of the system):2m_temperature_hourlyfor the bbox extent of the level 2 org units in your connected DHIS2 instance (valid datasets defined ineo_api/datasets/registry, and actual file downloads end up ineo_api/datasets/cache/):Eventually we want to merge this setup so we have a shared data registry and download folder including dataset-specific zarr archives for the whole system.