This is results analysis of topic two: Impact of Climate Variability on Crop Selection and Rotation Practices in Semi-Arid Zones: Evidence from Integrated Farmer Surveys and AI-Based Panel Data Analysis in Bugesera, Rwanda
# Impact of Climate Variability on Crop Selection and Rotation Practices
## Evidence from Bugesera District, Rwanda
## Project Overview
This repository contains the dataset, Python scripts, generated figures, tables, and summary outputs for the study **“Impact of Climate Variability on Crop Selection and Rotation Practices in Semi-Arid Zones.”** The analysis is based on survey data collected from smallholder farmers in Bugesera District, Rwanda, and examines how climate variability shapes crop selection, crop rotation, and related adaptation practices.
## Study Objectives
The project aims to:
- assess the effect of climate variability on crop selection and crop rotation practices;
- identify socioeconomic and environmental factors associated with farmer decision-making;
- generate descriptive, inferential, and predictive outputs from the survey data; and
- provide a clear and reproducible workflow for climate-smart agriculture research.
## Dataset
The repository uses a cross-sectional farmer survey from Bugesera District, Rwanda. The dataset includes variables on:
- household and demographic characteristics;
- farm size and agricultural inputs;
- perceived and geospatial climate risk;
- yield and loss outcomes; and
- adaptation responses such as crop rotation and advisory access.
**Sample used for analysis:** 240 valid farmer records
**Primary data file:** `data/FINAL Data collected in Bugesera District-Template (1).csv`
## Repository Structure
```text
Final/
├── README.md
├── requirements.txt
├── results_summary.md
├── .gitignore
├── data/
│ ├── FINAL Data collected in Bugesera District-Template (1).csv
│ └── Topic 2-Research paper.docx
├── results/
│ ├── figures/
│ │ └── Figures/
│ └── tables/
└── src/
├── 01_data_quality_and_cleaning.py
├── 02_descriptive_analysis.py
└── 03_models.py
```
## Analysis Workflow
### 1. Data cleaning and preparation
`src/01_data_quality_and_cleaning.py`
- removes blank or invalid records;
- standardises text-based re …