# Does Political Violence Trap Economies in Agriculture?
> Using 27 years of panel data (1996–2023) across 46 African countries, we examine whether political violence impedes structural economic transformation — the shift of labor from agriculture to industry and services.
## Overview
This project investigates the economic consequences of political violence, with a focus on Africa. When conflict erupts, investors pull out, supply chains break, and workers get stuck on farms. But how large is this effect, and how long does it persist? We combine conflict event data (ACLED, Africa-focused), employment statistics, GDP figures, and governance indicators to answer these questions through exploratory data analysis and panel regression modelling.
This repository contains cleaning scripts, exploratory analysis, panel regression code, and an interactive HTML report.
The full interactive report is available at `docs/index.html`.
## Data Sources
ACLED
- (Armed Conflict Location & Event Data Project)
- Conflict events & fatalities by country-year
- 1997–2023
- 268,511
World Bank
- Employment in agriculture/ industry/ services (% of total employment)
- 1996–2023
- 6,576
V-Dem (Varieties of Democracy)
- Rule of law index
- 1996–2023
- 4,953
All data are filtered to 46 African countries using the ACLED country list as the authoritative set.
After cleaning and merging — with all datasets filtered to African countries only (using the ACLED country list as the authoritative set) — the analysis dataset contains 1,288 country-year observations from 46 African countries, spanning 1996 to 2023.
## Methodology
### Data Pipeline
1. Cleaning (`code/01_data_cleaning.ipynb`): Standardised country names across all datasets, filtered all World Bank and V-Dem data to African countries only (using the ACLED country list as the authoritative set), handled missing values, and merged into a single Africa-only panel dataset.
2. Exploratory Data Analysis (`code/02_exploration.ipynb`): Pr …