Logo Lanfrica

lekejr/2023-Geospatial-Election-Integrity-Analysis-

Domaine:

peace and security
Créateur:
lek
HĂ´te:
Geospatial Election Integrity Analysis — Oyo State, Nigeria 🇳🇬 A data-driven project analyzing voting patterns from the 2023 Nigerian General Election to detect anomalies, outlier polling units, and potential irregularities using Python, geospatial clustering, and anomaly detection algorithms (DBSCAN, Moran’s I, Getis-Ord Gi*, Isolation Forest). # 🗺️ 2023 Geospatial Election Integrity Analysis — Oyo State, Nigeria ### Tools Used: Python (Pandas, GeoPandas, Scikit-learn, PySAL, Matplotlib, Folium) --- ## 📑 Table of Contents - 1. Introduction - 2. Objectives - 2.1 Dataset Preparation - 2.2 Advanced Neighbor Identification - 2.3 Outlier Score Calculation - 2.4 Temporal and Demographic Comparison - 3. Methodology - 3.1 Data Preparation - 3.2 Geospatial Clustering - 3.3 Outlier Score Analysis - 4. Findings - 5. Results - 6. Recommendations - 7. Conclusion - 8. Code Snippets and Visualizations --- ## 1. Introduction Following widespread allegations of electoral irregularities in the **2023 Nigerian General Election**, the **Independent National Electoral Commission (INEC)** required a multi-dimensional data-driven approach to assess election integrity. This project focuses on **identifying polling units where voting patterns deviate significantly** from expected trends or nearby units—suggesting potential manipulation or irregularities. The analysis targets **Oyo State, Nigeria**, leveraging advanced **geospatial techniques and anomaly detection algorithms**. --- ## 2. Objectives ### 2.1 Dataset Preparation - Cleaned the dataset by removing unnecessary columns and handling missing geospatial data (latitude and longitude). - Used the **OpenCage Geocoding API** to obtain missing coordinates. - Ensured consistent data formats for analysis and visualization. ### 2.2 Advanced Neighbor Identification - Applied **geospatial clustering** (DBSCAN) to group polling units by geographic proximity. - Performed **sensitivity analysis** with radii of 500m, 1km, and 2km. - Smaller radii revealed localized irregularities. - Larger radii captured broader spatial relationships. ### 2.3 Outlier Score Calculation - Detected **spatial clusters and anomalies** in voting patterns using multiple approaches: - **Local Moran’s I** — measures spatial autocorrelation. - **Getis-Ord Gi\*** — identifies hot and cold spots of vote c …