{"id":41343114,"url":"https://github.com/rodekruis/ibf-drought-model","last_synced_at":"2026-01-23T06:53:16.943Z","repository":{"id":40243151,"uuid":"400535830","full_name":"rodekruis/ibf-drought-model","owner":"rodekruis","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-24T15:37:44.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T16:33:10.103Z","etag":null,"topics":["aa"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rodekruis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-27T14:27:34.000Z","updated_at":"2025-03-24T15:35:27.000Z","dependencies_parsed_at":"2024-02-27T14:30:37.613Z","dependency_job_id":"2ad00ce8-018b-4702-9634-d11d35ed3533","html_url":"https://github.com/rodekruis/ibf-drought-model","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rodekruis/ibf-drought-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodekruis%2Fibf-drought-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodekruis%2Fibf-drought-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodekruis%2Fibf-drought-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodekruis%2Fibf-drought-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rodekruis","download_url":"https://codeload.github.com/rodekruis/ibf-drought-model/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rodekruis%2Fibf-drought-model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28682263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aa"],"created_at":"2026-01-23T06:53:16.293Z","updated_at":"2026-01-23T06:53:16.936Z","avatar_url":"https://github.com/rodekruis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IBF-drought-model\nDrought forecast pipeline for Zimbabwe RCS.\n\n## Introduction\n\nThis repo contains the code to:\n1. Get latest ENSO data \n2. Get latest CHIRPS data\n3. Get latest VCI data\n4. Forecast drought per province based on the latest data listed above.\n5. Calculate impacts of drought province\n\nData is on MS Azure Datalake `ibf`.\n\n## Functionalities\nThe pipeline is developed in Docker format. It can run locally in your desktop (with Dock installed, see below). A logic app is set up (510-ibf-drought) and to start the container and perform automated execution (monthly).\n\n**`settings.py`** contains basic settings for the pipeline:\n- To set test API for posting output and disable email notification\n- To switch between operation and dummy mode using a boolean switch `dummy`\n- To define lead-time based on the running mode and the month of execution\n- To define a switch of the forecast model depending on the month of execution\n- Data sources of ENSO, CHIRPS, VCI\n\n**`utils.py`** contains main functions for the pipeline. For now in dummy mode, only the last 2 functions will be executed.\n- `get_new_senso()`: get latest ENSO data from data source\n- `get_new_chirps()`: get latest daily CHIRPS data from data source and calculate monthly accumulation and dryspell per district\n- `get_new_vci()`: get latest observed VCI from data source and calculate monthly average VCI values per district\n- `arrange_data()`: prepare an input data for model 2 by combining ENSO and CHIRPS (and VCI) data into one\n- `forecast_model1()`: forecast drought per province based on the latest ENSO data, using trained XGBoost models\n- `forecast_model2()`: forecast drought per province based on the latest ENSO, monthly rainfall and 14-day dry spell data, using trained XGBoost models\n- `forecast_model3()`: forecast drought per province based on the latest ENSO, monthly rainfall, 14-day dry spell, and VCI data, using trained XGBoost models\n- `calculate_impact()`: calculate exposed population, cattles, ruminants per drought-predicted province(s)\n- `post_output()`: the processed data (drought forecast and impacts) will be posted to the IBF dashboard via IBF API \n\n## Setup\n\n### with Docker\n1. Install [Docker](https://www.docker.com/get-started)\n\n2. Build the docker image from the root directory\n```\ndocker build -t rodekruis/ibf-drought-model .\n```\n3. Run and access the docker container\n```\ndocker run -it --entrypoint /bin/bash rodekruis/ibf-drought-model\n```\n4. Set necessary credentials (in bitwarden) for the pipeline\n\n\n## Usage\nRun the pipeline with the command:\n```\nrun-drought-model\n```\n\n## Versions\nYou can find the versions in the [tags](https://github.com/rodekruis/ibf-drought-model/tags) of the commits. See below table to find which version of the pipeline corresponds to which version of IBF-Portal.\n| Drought Pipeline version  | IBF-Portal version | Changes |\n| ---  | --- | --- |\n| 0.2.6  | 0.305.2 | Convert to new warning/trigger setup |\n| 0.2.4 | 0.261.5 | Update `python` env \u003cbr\u003e Update `xgboost` package \u003cbr\u003e Reorder input data in `arrange_data()` \u003cbr\u003e Update objects of forecast model 2 and 3 based on new data order |\n| 0.2.3 | 0.247.3 | Correct `leadtime_str` of API payload |\n| 0.2.2 | 0.224.5 | Correct `arrange_data()` to get all past data \u003cbr\u003e Add `date` to API payloads |\n| 0.2.1 | 0.189.1 | Change VCI data name |\n| 0.2.0 | 0.170.0 | Model 3 added to the pipeline \u003cbr\u003e Function to download VCI data from NOAA added \u003cbr\u003e Function to arrange data adjusted for VCI data \u003cbr\u003e Enable downloading data in off-season|\n| 0.1.3 | 0.152.0 | Add function to post non-trigger in off-season |\n| 0.1.2 | 0.129.0 | Corrected generation of link to raw chirps file \u003cbr\u003e Fixed misdownloading a processed rainfall from datalake \u003cbr\u003e Fixed raw chirps files listing for calculating zonal statistics \u003cbr\u003e Minor fixes |\n| 0.1.1 | - | ENSO+rainfall model added \u003cbr\u003e Minor fixes | \n| 0.1.0 | - | Initial version, ENSO-only model |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodekruis%2Fibf-drought-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frodekruis%2Fibf-drought-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frodekruis%2Fibf-drought-model/lists"}