An interactive Streamlit dashboard for exploring the World Happiness Report 2023 through advanced multivariate statistical methods.
This application provides comprehensive factorial analysis tools to uncover patterns and relationships in global happiness data across multiple dimensions:
- ACP (PCA - Principal Component Analysis)
- AFC (Correspondence Analysis)
- AFCM (Multiple Correspondence Analysis)
- AFDM (Multiple Factor Analysis for Mixed Data)
- Interactive Visualizations: Dynamic plots using Plotly for exploring happiness indicators
- Multi-Method Analysis: Compare results across different factorial analysis techniques
- Regional Insights: Color-coded regional analysis across 10 global regions
- Custom Styling: Modern, gradient-based UI with responsive design
- Statistical Metrics: Detailed variance explanations, eigenvalues, and contribution analyses
- Python 3.x
- Streamlit - Web application framework
- Plotly - Interactive visualizations
- Pandas & NumPy - Data manipulation
- Scikit-learn - PCA implementation
- Prince - Correspondence analysis library
- SciPy - Statistical computations
- Statsmodels - Statistical models
-
Clone or download the repository
-
Create a virtual environment (recommended):
python -m venv .venv
-
Activate the virtual environment:
- Windows:
.venv\Scripts\Activate.ps1
- Linux/macOS:
source .venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
Run the Streamlit application:
streamlit run app.pyThe dashboard will open in your default web browser at http://localhost:8501.
The application analyzes happiness indicators including:
- GDP per capita (Logged)
- Social support
- Healthy life expectancy
- Freedom to make life choices
- Generosity
- Perceptions of corruption
- Happiness ladder score
Data covers multiple countries across 10 global regions:
- Western Europe
- North America & ANZ
- Latin America & Caribbean
- Central & Eastern Europe
- East Asia
- Southeast Asia
- Middle East & North Africa
- Sub-Saharan Africa
- South Asia
- Commonwealth of Independent States
Reduces dimensionality of continuous variables to identify main variance directions.
Analyzes relationships between categorical variables in contingency tables.
Extension of AFC for analyzing multiple categorical variables simultaneously.
Handles datasets containing both quantitative and qualitative variables.
The dashboard features:
- Hero banner with gradient styling
- Sidebar controls for method and variable selection
- Tabbed navigation for different analysis views
- Metric cards displaying key statistics
- Interactive charts with hover tooltips and zoom capabilities
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
└── README.md # This file
Youxise - Yanis - Mohammed
This project is for educational purposes.
Note: Make sure all dependencies are installed before running the application. The dashboard requires stable internet connection for loading custom fonts from Google Fonts.