# Life Expectancy Prediction using World Bank Development Indicators
## Project Overview
This project predicts **life expectancy at birth** for Sub-Saharan African countries using socioeconomic indicators from the **World Bank Development Indicators (WDI)** dataset.
The project covers the complete machine learning workflow:
- Data collection and preprocessing
- Exploratory Data Analysis (EDA)
- Feature engineering
- Model training and evaluation
- Model comparison
- Model deployment using FastAPI
- Interactive web application using Streamlit
---
## Project Objective
The objective of this project is to predict a country's life expectancy using national development indicators such as:
- Access to electricity
- GDP per capita
- Internet usage
- Health expenditure
- Basic sanitation
- Population growth
- Primary school enrollment
- Urban population
---
## Project Structure
```
Life_Expectancy_Prediction_WDI/
│
├── app/
│ ├── __init__.py
│ └── app.py # Streamlit application
│
├── api/
│ ├── __init__.py
│ └── main.py # FastAPI application
│
├── assets/ # Screenshots and images
│
├── data/
│ ├── raw/
│ └── processed/
│
├── models/
│ ├── random_forest_model.pkl
│ └── feature_names.pkl
│
├── notebooks/
│ └── Life_Expectancy_Prediction.ipynb
│
├── reports/
│
├── src/
│ ├── __init__.py
│ └── predict.py
│
├── requirements.txt
├── README.md
├── LICENSE
└── .gitignore
```
---
## Dataset
**Source:** World Bank World Development Indicators (WDI)
**Region:** 48 Sub-Saharan African Countries
**Period:** 2000–2023
**Target Variable:** Life expectancy at birth (years)
Raw WDI exports live in `data/raw/` but are not tracked in this repository, since they're large and can be re-downloaded directly from the World Bank source. The cleaned dataset used for training is tracked in `data/processed/`.
---
## Features Used
- Year
- Access to electricity (% of population)
- Current health expenditure ( …