Logo Lanfrica

habibfl/senegal-real-estate-ml

Domain:

socioeconomic
Creator:
hab
Host:
Machine learning model to predict real estate prices in Senegal using scraped data from local listing websites # Senegal Real Estate Price Prediction Machine learning models to predict real estate prices in Dakar, Senegal. ## Motivation The Senegalese real estate market is one of the fastest growing in West Africa, yet no public dataset or pricing model exists for it. This project builds a price prediction system from scratch using data inspired by real listings from expat-dakar.com and jumia.sn. ## What This Project Does - Builds a dataset of 500 real estate listings across 12 Dakar neighborhoods - Explores price distributions by neighborhood, property type and surface area - Trains and compares 3 machine learning models - Builds a price simulator for any property in Dakar ## Results | Model | R2 Score | MAE | |---|---|---| | Linear Regression | 0.50 | 22,389,032 FCFA | | Random Forest | 0.90 | 9,601,801 FCFA | | Gradient Boosting | 0.92 | 8,472,313 FCFA | Gradient Boosting is the best model with 92% variance explained. ## Key Findings - Surface area is the most important price predictor (70% importance) - Neighborhood is the second most important factor - Plateau and Almadies are the most expensive neighborhoods - Pikine and Guediawaye are the most affordable ## Tech Stack - Python 3.14 - Pandas, Numpy — data manipulation - Scikit-learn — machine learning models - Matplotlib, Seaborn — visualizations ## Project Structure senegal-real-estate-ml/ ├── data/ │ └── immobilier_senegal.csv ├── notebooks/ │ └── real_estate_senegal.ipynb ├── visuals/ │ ├── exploration_immobilier.png │ └── resultats_modeles.png └── README.md ## How to Run 1. Clone this repository 2. Create a virtual environment 3. Install dependencies ```bash pip install pandas numpy matplotlib seaborn scikit-learn ``` 4. Run the notebook `notebooks/real_estate_senegal.ipynb`