# ๐ Nigerian State Predictor Using Latitude & Longitude
This Streamlit web app uses a trained Artificial Neural Network (ANN) to predict the Nigerian state for any given **latitude and longitude**. It also returns the **top 3 most probable states** and their associated prediction confidence.
> ๐ฏ Built for data-driven geospatial classification using major telecoms and collocation partner datasets across Nigeria.
---
## ๐ Demo
๐ Live App: Streamlit Cloud Deployment
---
## โจ Features
- ๐ Predicts one of **37 Nigerian regions** (36 states + FCT renamed to Abuja)
- ๐ข Uses a trained ANN (`main_model.keras`) and scaled features via `scaler.pkl`
- ๐ Shows top 3 predictions with probabilities
- ๐ง Trained on telecom infrastructure geocoordinates
- ๐ Powered by TensorFlow, Streamlit, and Scikit-learn
---
## ๐ง How It Works
### Input:
- Latitude (e.g., `9.0578`)
- Longitude (e.g., `7.4951`)
### Output:
- Most likely state: `Abuja`
- Probability: `92.4%`
- Other candidates: `Nasarawa (6.3%)`, `Kogi (1.3%)`
---
## ๐ ๏ธ Setup Locally
```bash
# Clone the repo
git clone
github.com
cd nigeria-state-predictor
# Create and activate a virtual environment
conda create -n streamlit-env python=3.10
conda activate streamlit-env
# Install required libraries
pip install -r requirements.txt
# Run the app
streamlit run main.py
```
## ๐ Project Structure
```
๐ฆ nigeria-state-predictor/
โฃ ๐main.py
โฃ ๐requirements.txt
โฃ ๐runtime.txt
โฃ ๐scaler.pkl
โฃ ๐main_model.keras
โ ๐ผ๏ธscreenshot.png
โโโ .streamlit/
โ โโโ config.toml
โโโ README.md
```
## ๐ธ Screenshots
## ๐ค Deployment
App is deployed on Streamlit Cloud.
Free to use, open source, and no signup required for visitors!
## ๐โโ๏ธ Creator Info
๐ง Created by: Chukwuka Chijioke Jerry
๐ง Email: chukwuka.jerry@gmail.com
๐ฑ WhatsApp: +2348038782912
๐ LinkedIn:
linkedin.com
๐ฆ X (Twitter): @Mazimum_
๐ Future Work
๐ฆ Add support for batch predictions via file upload
๐ Extend model to โฆ