data science project on quality of water in south africa
# South Africa Water Quality Prediction
This repository contains a machine learning pipeline for predicting water quality indicators in South Africa using environmental, Landsat, and TerraClimate data. The project demonstrates **data processing, feature engineering, model training, and evaluation**.
The dataset spans a five-year period from 2011 to 2015. Using API-based data extraction methods, both Landsat and TerraClimate features were retrieved directly from the Microsoft Planetary Computer portal. These combined spectral, index-based, and climatic features were used as predictors in a regression model to estimate three key water quality parameters: Total Alkalinity (TA), Electrical Conductance (EC), and Dissolved Reactive Phosphorus (DRP).
---
## Project Structure
south_africa-water_quality-ml/
│
├── data/
│ ├── raw/ # Raw datasets (not included in repo due to size)
│ ├── processed/
│ └── example/
│
├── src/
│ ├── data_processing.py
│ ├── feature_engineering.py
│ ├── train_model.py
│ └── evaluate_model.py
│
├── models/
│ └── trained_models/
│
├── .gitignore
└── README.md
---
## Setup
1. **Clone the repository**
```bash
git clone
cd south_africa-water_quality-ml
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\activate # Windows
pip install -r requirements.txt
# Running the pipeline
python src/data_processing.py
python src/feature_engineering.py
python src/train_model.py
python src/evaluate_model.py