The Climpact tools supports the generation of climate indices for health and agriculture using local temperature and rainfall data. They recently conducted a training in Uganda and METS feels this generate some of the relevant products that we can integrate into the DHIS2. I see our dhis2 climate services tools being relevant for this kind of integrations. Here is the list of indices they can generate https://etrp.wmo.int/pluginfile.php/47030/mod_resource/content/6/climpact_indices_table_updated18Aug2023.pdf
These climate indices look useful, and it would be nice to support them in DHIS2 Climate Tools to automate the process, and to show examples in Jupyter Notebooks. I see that Climpact is using R, while Climate Tools is based on the Python ecosystem. We have some options:
- Check if we can run R code in Python using a tool like
rpy2: GitHub - rpy2/rpy2: Interface to use R from Python - Port the R code to Python for climate indices we would like to support
- Look for existing Python libraries that generate the same indices. Some of them are implemented in the
climate-library: Welcome to climate-library’s documentation! — climate-library 0.1.1 documentation
The last option will be the easiest way to get started, and we could run the same calculations with Climpact to check if we get the same results.
The xclim library also contains several climate indices functions: Climate Indices - xclim Official Documentation
They all operate on xarray which is how we use gridded data in our Climate Tools, so it should be easy to integrate.
@omielp, is there a climate index that you think would benefit our users? If yes, we could try to make a notebook example of how to generate and visualise it.