Life Expectancy Prediction
This project investigates how various social, health, environmental, and economic factors influence life expectancy across countries. It leverages multiple machine learning models to predict life expectancy based on real-world data sourced from organizations like the WHO and World Bank.
Overview
The main objectives of this project are:
- To build a clean, comprehensive dataset by filtering and merging publicly available tables
- To predict life expectancy using six different supervised learning methods
- To evaluate which features most influence life expectancy across countries
- To visualize the results in an interactive Power BI dashboard
Project Structure
life-expectancy-prediction/
│
├── data/
│ ├── raw/ # Original CSVs from WHO, World Bank, etc.
│ └── processed/ # Cleaned data used for modeling
│
├── dashboard/
│ └── Project.pbix # Final visualization dashboard
│
├── notebooks/
│ ├── export_tables.ipynb # SQL table creation and export logic
│ ├── predictors.ipynb # Model definitions, training, evaluation
│ └── linear_regression_func.ipynb # Linear regression previous problem study
│
├── scripts/
│ ├── config.py # Config file
│ ├── ds_charts.py # Modular functions for charts
│ └── main.py # Helpers
│
└── README.md # This file
Data Sources
The data used for this project comes from:
A total of 40+ CSVs were considered. After evaluating completeness and relevance, 25 datasets were selected and merged. Only columns covering at least 100 countries across 20+ years were included.
Features Considered
Examples of selected features include:
- GDP per capita
- Adult mortality
- Sanitation access
- CO2 emissions
- BMI
- Obesity rates
- Literacy rate
- Suicide and homicide statistics
- Urban and rural population share
- Exposure to air pollution
- Drug and alcohol use
- Caloric supply
All data was transformed to match a consistent format, with as central reference fields.