An end-to-end data analytics project using Python (Pandas) to clean and transform a raw Nigerian agricultural dataset, resolving formatting and datatype inconsistencies. Data was then imported into Power BI to construct a dynamic dashboard mapping ₦1.96B in revenue, regional crop yields, loan sizes, and farmer demographics across states.
# Agriculture-Data-Analysis-Project-Nigeria
## Project Overview
This project presents an end-to-end data analytics workflow designed to clean, transform, and visualize an agricultural dataset containing information on farmers across multiple states in Nigeria. The ultimate goal is to provide deep stakeholder insights into total revenue, gender distribution, regional farm productivity, loan sizes, and fertilizer adoption.
The workflow is split into two major phases:
1. **Data Cleaning & Transformation:** Handled programmatically using **Python (Pandas)** inside a Jupyter Notebook.
2. **Data Visualization & Business Intelligence:** Handled dynamically via **Power BI Desktop**, producing an executive-facing PDF report / dashboard.
## Key Metrics & Dashboard Insights
From the final analysis of **500 Total Records**, the project uncovered the following high-level KPIs:
* **Total Revenue Generated:** ₦1.96 Billion
* **Total Tracked Farmers:** 491 (after removing anomalies)
* **Gender Distribution:** 54.44% Male (245) vs 45.56% Female (205)
* **Fertilizer Adoption:** 217 Fertilizer Users vs 170 Non-Users
* **Top Revenue-Generating State:** **Kano State** leads with over ₦337 Million in revenue.
* **Top Performing Crop:** **Maize** yielded the highest market revenue at ₦0.46 Billion, followed closely by **Rice** (₦0.45B).
## Phase 1: Data Cleaning & Transformation (Python)
### Data Challenges Addressed
The raw `Agriculture.csv` dataset contained significant structural inconsistency and noise:
* **Inconsistent Categorical Values:** The `Gender` column mixed entries like `'female'`, `'Female'`, `'male'`, `'Male'`, `'M'`, and `'F'`.
* **Inconsistent State Names:** State records contained variations like `'KANO'`, `'lagos'`, and `'Lagos'`.
* **String Placeholders for Missing Data:** The `FarmSize_Ha` and `Age` columns used string texts like `'unknown'` or `'N/A'` alongside numbers, forcing Pandas to interpret them as text objects.
* **Whitespace & Formatting Issues …