# π³π¬ Nigeria Election Analytics Hub
A real-time Streamlit dashboard for comprehensive analysis of Nigeria's election data spanning 2015β2023.
---
## π Features
| Module | What It Shows |
|---|---|
| **Election Results** | Presidential winners, gubernatorial state-by-state table, party win counts |
| **Vote Share & Trends** | National vote share over time, zone-level stacked bars, scatter analysis |
| **Regional Patterns** | Animated zone bars, APC heatmap, treemap of state dominance |
| **Voter Turnout** | Turnout trends, participation funnel, youth/female demographics |
| **National Assembly** | Senate & House seat distribution, zone breakdown, area charts |
| **Anomaly Indicators** | Turnout swings, rejection outliers, landslide wins, flagged anomalies |
---
## π Quick Start
### 1. Install dependencies
```bash
pip install -r requirements.txt
```
### 2. Run the dashboard
```bash
streamlit run app.py
```
### 3. Open in browser
The dashboard opens at: `
localhost`
---
## π Project Structure
```
nigeria_election_dashboard/
βββ app.py # Main Streamlit application
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ data/
βββ presidential_results.csv # Pres. votes by state/party (2015-2023)
βββ gubernatorial_results.csv # Gov. winners by state (2015-2023)
βββ voter_turnout.csv # Turnout & demographics (2015-2023)
βββ national_assembly.csv # Senate/House seats by zone/party
```
---
## π¦ Data Sources
- **INEC** β Independent National Electoral Commission official results
- **Stears Elections** β stears.co election database
- **YIAGA Africa** β Parallel vote tabulation & civic observer data
- **SBM Intelligence** β Electoral analytics reports
- **Academic literature** β Electoral Studies, African Affairs journals
---
## ποΈ Dashboard Controls
Use the **sidebar** to filter:
- **Election Years**: 2015, 2019, 2023 (multi-select)
- **Geopolitical Zones**: All 6 z β¦