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.

GODFRED-KINGDOM/ghana-housing-price-predictor

Domain:

socioeconomic

Record type:

project
Creator:
GOD
Host:
# Ghana Housing Price Prediction — End-to-End Pipeline ## ⚠️ Important note on data No live, clean public dataset of Ghana housing prices was accessible in this environment. To demonstrate the **full pipeline** (not just modeling), a realistic synthetic dataset (3,000 listings) was generated using known Ghana real-estate patterns: Accra/Tema price premiums, gated-community and pool premiums, distance-to-CBD depreciation, property age depreciation, etc. **Before using this in production, `01_generate_data.py` must be replaced with a real data source** (e.g. scraped/licensed data from meQasa, Jiji Ghana, or Ghana Statistical Service records). The pipeline architecture (EDA → features → training → evaluation → deployment) stays identical either way. ## Pipeline stages |File|Stage|What it does| |-|-|-| |`src/01_generate_data.py`|Data Collection|Builds `data/ghana_housing.csv` (3,000 rows, 14 columns)| |`src/02_eda_and_preprocessing.py`|EDA + Feature Engineering|Checks nulls, price by city/type, correlations, one-hot encoding, engineered features| |`src/03_train_models.py`|Modeling + Evaluation|Trains 4 models, compares MAE/RMSE/R²/MAPE, saves the best one| |`src/04_app.py`|Deployment|Flask REST API (`/predict`, `/health`) serving live predictions| ## Results (on held-out 20% test set) |Model|MAE (GHS)|RMSE (GHS)|R²|MAPE| |-|-|-|-|-| |**Gradient Boosting (chosen)**|139,624|194,359|**0.891**|12.8%| |Ridge Regression|158,857|210,611|0.872|17.3%| |Linear Regression|158,878|210,620|0.872|17.3%| |Random Forest|159,886|219,165|0.862|15.7%| **Gradient Boosting** was selected because it gave the best accuracy **(highest R²)** and the lowest prediction errors, making it the strongest model for housing price prediction. ## Top price drivers found by the model - Plot size - Floor size - City (Tamale/Cape Coast/Kumasi vs. Accra) - Distance to CBD - Property age - Property type ## Running it ```bash pip install pandas numpy scikit-learn joblib flask python3 src/01_genera …

Visit

github.com

Languages

Ga

Similar

ethioel/addis-housing-price-predictorBikis-Biset16/ethiopian-housing-price-predictorMahmoud-islamcs/egypt-housing-price-predictorGODFRED-KINGDOM/USAID-FAA-Activity-Monitoring-DashboardHaywhyCoder/Lagos-Housing-PredictorLynn578/food-price-predictor

ethioel/addis-housing-price-predictor

🏠 Addis Ababa Housing Price Predictor - Synthetic data generation and machine learning pipeline for

Bikis-Biset16/ethiopian-housing-price-predictor

Interactive Flask web application for house price estimation using trained machine learning pipeline

Mahmoud-islamcs/egypt-housing-price-predictor

An end-to-end machine learning Streamlit app that predicts residential property prices in Egypt usin

GODFRED-KINGDOM/USAID-FAA-Activity-Monitoring-Dashboard

A data visualization dashboard designed to track and monitor Fixed Amount Award (FAA) activities acr

HaywhyCoder/Lagos-Housing-Predictor

A machine learning practice project designed for the NSBE UNILAG Machine Learning Skills Lab Trainin

Lynn578/food-price-predictor

Food price prediction and analysis app for Kenya Food Price Predictor - Kenya 🍽️ Streamlit web app