Logo Lanfrica

johnemechete/Maji-Ndogo-Regression-Analysis

Domain:

agriculture

Record type:

project
Creator:
joh
Host:
β€œRegression analysis on environmental factors affecting crop yield in Maji Ndogo # 🌾 Predicting Crop Yields in Maji Ndogo: A Linear Regression Learning Journey This repository contains the code, data, and visuals used in the **Maji Ndogo Crop Yield Analysis** project β€” a data science exploration of how environmental factors such as temperature and pollution influence agricultural productivity. What began as an ALX classroom assignment evolved into a personal project to strengthen my data analysis and storytelling skills. I refined the original notebook, explored the data more deeply, and transformed it into a portfolio piece that showcases both technical understanding and interpretation. --- ## πŸ“Š Project Overview **Goal:** To determine whether temperature or pollution levels have a measurable linear relationship with standardized crop yield in Maji Ndogo. **Key Findings:** - 🌑️ **Average Temperature:** Showed almost no linear relationship with yield. - 🏭 **Pollution Level:** Displayed a weak negative correlation β€” higher pollution slightly reduced yield. - πŸ“ˆ **Model Evaluation:** Low RΒ² (~0.08) suggests pollution alone cannot explain yield variations. - πŸ” **Residual Analysis:** Residuals were mostly random, but minor heteroscedasticity hints at missing variables. πŸ“– **Read the full article on Medium:** πŸ‘‰ Predicting Crop Yields in Maji Ndogo: A Linear Regression Learning Journey --- ## 🧩 Repository Structure Maji-Ndogo-Regression-Analysis/ β”‚ β”œβ”€β”€ data/ β”‚ └── maji_ndogo.db # SQLite database β”‚ β”œβ”€β”€ notebooks/ β”‚ └── Maji_Ndogo_Regression_Analysis.ipynb β”‚ β”œβ”€β”€ visuals/ β”‚ β”œβ”€β”€ temperature_vs_yield.png β”‚ β”œβ”€β”€ pollution_vs_yield.png β”‚ β”œβ”€β”€ residual_histogram.png β”‚ └── residuals_vs_predicted.png β”‚ β”œβ”€β”€ requirements.txt └── README.md --- ## πŸš€ How to Run 1. **Clone this repository** ```bash git clone github.com cd Maji-Ndogo-Regression-Analysis Install dependencies pip install -r requirements.txt Launch the notebook jupyter notebook notebooks/Maji_Ndogo_Regression_Analysis.ipynb (Optiona …

Languages

Licenses