Summary
First archived release of the code used in the article:
S. Grosse, T. Berchoux, H. Belhouchette, M. Check, N. Baghdadi (2024).
Assessing Multi-Hazard Risk Dynamics in South African Maize Production:
A Framework Integrating Hazard Interactions, Temporal and Spatial Variability, and Irrigation Contexts.
This repository provides the scripts used to analyse the spatio-temporal dynamics
of climate-induced hazards for maize in South Africa, their interactions, and
the role of irrigation in mitigating risk.
What this release includes
Python scripts for:
Climatic hazard profiling (drought, heatwaves, cold spells, excessive rainfall, disease risk)
City-level clustering based on irrigation coverage
Construction of multi-hazard risk scores
OLS models linking hazard metrics and yield variability
Random Forest models predicting yield from climatic and hazard conditions
Refactored code in scripts/ and original backup scripts in scripts/bak/
requirements.txt listing all Python dependencies
Project structure compatible with reproducing the main analyses in the paper
Note: The data/ and results/ folders are not tracked in version control.
Users must provide their own input data in the expected formats.
Folder structure
data/ – raw and processed data (not included)
scripts/ – main Python scripts for modelling and analysis
scripts/bak/ – original non-refactored scripts
results/ – plots, metrics, and model outputs (not included)
requirements.txt – list of Python dependencies
README.md – documentation and usage instructions