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 β¦