Interactive Streamlit dashboard for profiling Nigeria's polling units with geospatial visualization, voter statistics, and administrative boundary analysis.
# 🗳️ INEC Polling Unit Profiler
An interactive Streamlit dashboard for analysing **INEC (Independent National Electoral Commission)** polling unit delimitation data across Nigeria. The application provides drill-down analysis from **State → LGA → Ward**, complemented by interactive charts, summary statistics, and geospatial visualizations powered by GADM administrative boundary shapefiles.
---
## 📸 Preview
---
## ✨ Features
- **State-level overview**: key summary metrics at a glance
- **Drill-down analysis**: State → Local Government Area (LGA) → Registration Ward, with metrics updating live at each level
- **Visual analytics**: charts that automatically adjust to your current drill-down level
- **Geospatial mapping**: interactive maps of Nigerian states and LGAs, with fuzzy name-matching to reconcile dataset names against shapefile boundaries
- **Search & filter**: quickly locate specific records within the dataset
- **Export**: download filtered data as CSV or Excel
- **Map links**: direct map links for records with available coordinates
---
## 🛠️ Tech Stack
- **Framework**: Streamlit
- **Data processing**: pandas
- **Geospatial**: geopandas, pydeck
- **Visualization**: Plotly Express
- **Shapefiles**: GADM (Global Administrative Areas) — Nigeria levels 1 (state) and 2 (LGA)
---
## 📁 Project Structure
```
├── app.py
├── utils/
│ ├── loader.py
│ ├── summaries.py
│ ├── lga.py
│ ├── ward.py
│ ├── charts.py
│ └── maps.py
├── scripts/
│ └── get_cordinates.py
├── geo_data/
├── assets/
│ └── dashboard-preview.png
├── requirements.txt
└── .gitignore
```
---
## 🗃️ Data
- **Shapefiles**: Included in `geo_data/` (sourced from GADM)
- **Polling unit data**: Proprietary, not included in this repository. To run locally, place your own state-level Excel file(s) in a `data/` folder at the project root.
Expected columns for polling unit data:
| Column | Description |
|---|---|
| `stateCode`, `localGovtAreaCode`, `regAreaWardCode`, `pollingUnitCode …