Skip to content

Youxise/factorial-data-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🌍 Multivariate Factorial Analysis Dashboard

An interactive Streamlit dashboard for exploring the World Happiness Report 2023 through advanced multivariate statistical methods.

📊 Overview

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)

✨ Features

  • 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

🛠️ Technologies

  • 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

📦 Installation

  1. Clone or download the repository

  2. Create a virtual environment (recommended):

    python -m venv .venv
  3. Activate the virtual environment:

    • Windows:
      .venv\Scripts\Activate.ps1
    • Linux/macOS:
      source .venv/bin/activate
  4. Install dependencies:

    pip install -r requirements.txt

🚀 Usage

Run the Streamlit application:

streamlit run app.py

The dashboard will open in your default web browser at http://localhost:8501.

📈 Data

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

📚 Analysis Methods

ACP (Principal Component Analysis)

Reduces dimensionality of continuous variables to identify main variance directions.

AFC (Correspondence Analysis)

Analyzes relationships between categorical variables in contingency tables.

AFCM (Multiple Correspondence Analysis)

Extension of AFC for analyzing multiple categorical variables simultaneously.

AFDM (Multiple Factor Analysis for Mixed Data)

Handles datasets containing both quantitative and qualitative variables.

🎨 User Interface

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

📄 Project Structure

├── app.py              # Main Streamlit application
├── requirements.txt    # Python dependencies
└── README.md          # This file

👥 Author

Youxise - Yanis - Mohammed

📝 License

This project is for educational purposes.

🔗 References


Note: Make sure all dependencies are installed before running the application. The dashboard requires stable internet connection for loading custom fonts from Google Fonts.

About

Streamlit dashboard for exploring the World Happiness Report 2023

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages