Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Soil Erosion Risk Analyzer (SERA) 🌍

A predictive modeling tool for identifying and quantifying soil erosion risks in varied terrains, with a focus on the geological challenges faced in Ghanaian communities.

Python Scikit-learn Matplotlib Status


SERA Output

SERA Output

Table of Contents


Overview

SERA analyzes the relationship between environmental factors — Rainfall (Erosivity) and Slope (Erodibility) — to predict soil loss in tons per hectare, using Multiple Linear Regression. Study areas include the Akwapim-Togo Range and coastal belts of Ghana.

It serves as a Decision Support System (DSS) for geological engineers and local planning authorities, providing quantitative evidence for soil conservation strategies.


Key Features

  • Predictive Modeling — Uses Scikit-learn to calculate erosion trends from historical geological data
  • Dynamic Risk Assessment — Categorizes results into Low, Moderate, and High risk zones
  • Automated Recommendations — Suggests engineering interventions (Bench Terracing, Check Dams, Reforestation) based on output severity
  • Data Visualization — Generates Matplotlib graphs showing the regression trend line and specific risk coordinates

Tech Stack

Component Technology
Language Python 3.14
Data Analysis Pandas, NumPy
Machine Learning Scikit-learn (Linear Regression)
Visualization Matplotlib

The Geological Model

SERA operates on the following derived regression equation:

Erosion = 0.018(Rainfall) + 0.429(Slope) - 2.036

Key insight: The coefficient on Slope (0.429) is significantly larger than that of Rainfall (0.018), confirming that slope gradient is the primary driver of land degradation in the study area. This provides a quantitative basis for prioritizing slope-stabilization interventions.


Installation & Usage

1. Clone the repository

git clone https://github.com/Kyeremeh-Cosmos/soil-erosion-analyzer.git
cd soil-erosion-analyzer

2. Set up a virtual environment

python -m venv .venv
source .venv/Scripts/activate    # Windows
# source .venv/bin/activate      # macOS / Linux

3. Install dependencies

pip install pandas numpy matplotlib scikit-learn

4. Run the application

python main.py

Sample Output

The visual output includes:

  • 📈 Historical Trend Line — regression fit across the training data
  • Risk Coordinate (Gold Star) — plots the input scenario on the trend, allowing non-technical stakeholders to immediately visualize the impact of environmental changes on their land

Author

Kyeremeh Cosmos Computer Engineering & Engineering Student

LinkedIn Portfolio

About

A Python-based Decision Support System (DSS) that predicts soil erosion risk in tons/hectare using Multiple Linear Regression on rainfall and slope data, with automated risk classification and engineering recommendations. Built for Ghanaian terrain.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages