Multi-hazard risk assessment for South African maize production .
# Repository: Multi-Hazard Risk Assessment for Maize Production in South Africa
This repository provides the companion code for the research article:
**Assessing Multi-Hazard Risk Dynamics in South African Maize Production: A Framework Integrating Hazard Interactions, Temporal and Spatial Variability, and Irrigation Contexts.**
## **Overview**
Climate change amplifies agricultural risks, particularly for **rainfed maize production in South Africa**. This repository contains the scripts used in the study to analyze the **spatio-temporal dynamics of climate-induced hazards**, their interactions, and the role of irrigation in mitigating risks.
The study introduces a **multi-hazard risk score system**, integrating:
- **City-level clustering** based on irrigation coverage.
- **Climatic hazard profiling** (drought, heatwaves, cold spells, excessive rainfall, and disease risk).
- **Multi-hazard interaction analysis** linking risk scores to yield variability.
- **OLS and Random Forest models** to predict yield based on climatic conditions and hazard interactions.
The repository provides all necessary scripts to replicate data preprocessing, clustering, risk assessment, and statistical modeling.
## **Folder Structure**
```
π project_root/
βββ π data/ # Raw and processed data - not included in version control
βββ π scripts/ # Python scripts for modeling and analysis (after refactoring)
β βββ π bak/ # Original non-refactored script files
βββ π results/ # Output results (plots, model outputs, metrics) - not included in version control
β βββ plots/
β βββ metrics/
βββ π requirements.txt # Dependencies required to run the code
βββ π .gitignore # Ignore large or sensitive files (e.g., data, logs)
βββ π README.md # Documentation and instructions for use
```
## **Installation & Setup**
1. Clone the repository:
```bash
git clone
github.com β¦