Analysis of climate change effects on maize yield in Eswatini (1993-2023)
# 🌽 Effects of Climate Change on Maize Yield in Eswatini (1993–2023)
## 📌 Project Overview
This project investigates how climate change variables temperature, rainfall,
and carbon emissions have affected maize yield in Eswatini over a 30-year period
(1993–2023). The analysis combines statistical methods, machine learning, and
interactive visualizations to uncover meaningful patterns and forecast future yield trends.
## 🌍 Background & Context
Maize (*Zea mays*) is the staple food crop of Eswatini, forming the foundation
of both household food security and the national agricultural economy. The majority
of maize production in Eswatini is carried out by **smallholder farmers** who depend
almost entirely on **rain-fed agriculture**, with minimal access to irrigation
infrastructure.
This heavy dependence on rainfall makes Eswatini's maize sector extremely
vulnerable to climate variability. Rising temperatures, erratic rainfall patterns,
and prolonged droughts — increasingly linked to climate change — pose a serious
threat to yields and by extension, the food security of the population.
The **2015/2016 El Niño drought** serves as a stark example, pushing maize yield
to its lowest recorded level of **0.73 t/ha** in 2016 — well below the national
average. Understanding how climate variables drive yield variation is therefore
not just an academic exercise but a **critical policy and planning need** for
Eswatini's agricultural sector.
---
## 🎯 Objectives
- Analyze trends in maize yield alongside key climate variables
- Measure the strength of relationships between climate and yield
- Build predictive models to explain yield variation
- Forecast maize yield through 2031 based on historical climate trends
---
## đź“‚ Project Structure
├── data/
│ ├── raw/ # Original Excel dataset
│ └── processed/ # Cleaned CSV dataset
├── visuals/
│ ├── trend_plots.png
│ ├── correlation_heatmap.png
│ ├── regression_actual_vs_predicted.png
│ ├── …