Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

CharityPM/tanzanian-water-wells-prediction

Domain:

environment and energygeospatial

Record type:

datasetmodel
Creator:
Cha
Host:
predicting Tanzania water-well functionality # 💧 Waterpoint Status Classification in Tanzania This project focuses on predicting the functionality status of waterpoints in Tanzania using machine learning. Access to clean water is essential, and identifying non-functional waterpoints ensures timely maintenance and resource allocation. ## 🔍 Project Objectives - **Classify** waterpoints into two categories: - `functional` - `needs_attention` - **Compare** multiple classification models. - **Select** the best performing model. - **Evaluate** using relevant metrics like accuracy, precision, recall, and F1-score. - **Visualize** results for clear interpretation. --- ## 📂 Dataset The dataset consists of waterpoints across various regions in Tanzania, with features including: - `amount_tsh` (total static head in meters) - `gps_height` - `population` - `well_age` - `installer`, `basin`, `region`, `scheme_management`, etc. Target variable: - `status_group`: Whether a waterpoint is `functional` or `needs_attention`. --- ## 🧪 Models Developed - **Logistic Regression**: Accuracy = 77.49% - Good at identifying functional wells. - Missed several wells needing attention. - **Decision Tree**: Accuracy = 77.0% - High recall for functional wells. - Moderate performance for identifying faulty wells. - **Random Forest (Baseline)**: Accuracy = 81.87% - Balanced performance across both classes. - Best among base models. - **Random Forest (Tuned)**: Accuracy = 82% - Improved recall and F1-score. - Robust and reliable classifier. --- ## 📊 Exploratory Data Analysis & Visualization ### Load the data ```python import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Load the dataset df = pd.read_csv('waterpoint_data.csv') df.head() Sample Visualizations python Copy Edit # Class distribution sns.countplot(data=df, x='status_group') plt.title('Waterpoint Status Distribution') plt.xticks(rotation=15) plt.show() # Population vs Status sns.boxplot(data=df, x='status_group', y='population') plt.yscale('lo …

Visit

github.com

Tasks

text classification