Export Image
Export Code

Data Viz_Final Project

SamyAttia

Last edited Dec 05, 2024
Created on Nov 26, 2024

World Happiness Report 2022:

An Interactive Visualization

The World Happiness Report 2022 offers fascinating insights into the factors that contribute to happiness across nations. Leveraging this rich dataset, I created an interactive visualization to uncover patterns and correlations among happiness factors such as GDP per capita, social support, life expectancy, and more. This project merges data storytelling with user-centric interactivity to deliver an engaging and informative exploration of happiness worldwide.

Screenshot 2024-12-03 at 6 46 53 PM

Data

The dataset is sourced from the World Happiness Report 2022 (https://www.kaggle.com/datasets/ajaypalsinghlo/world-happiness-report-2022?select=World+Happiness+Report+2022.csv), It provides comprehensive metrics for 146 countries, detailing factors such as:

  • GDP per capita
  • Social support
  • Healthy life expectancy
  • Freedom to make life choices
  • Generosity
  • Perceptions of corruption

Flags for countries are sourced from the Circle Flags Gallery to enhance visual clarity. https://hatscripts.github.io/circle-flags/gallery

Project Objectives

This project aims to answer critical questions through visualization:

  • What is the correlation between GDP per capita and happiness scores?
  • How are happiness scores distributed geographically?
  • Which factors drive happiness in the top-ranking countries?
  • Can we identify outliers—countries with high happiness despite low perceptions of corruption?
  • How do happiness scores differ across continents?

Development Journey

Initial Sketches

The project began with conceptual sketches, envisioning multiple visualization components:

  • Interactive Map: Highlighting geographic trends and happiness scores across all countries.
  • Side Panels: Displaying the top and bottom 5 countries with detailed factor breakdowns.
  • Scatter Plots: Offering deeper insights into factor relationships.

Interactive Features

Dynamic Map

  • Circles represent countries, scaled and color-coded by happiness scores.
  • Hovering over a circle displays detailed data, including happiness score, GDP, and rank.
Screenshot 2024-12-03 at 6 58 17 PM

Side Panels

  • The left panel highlights the top 5 happiest countries, while the right panel features the bottom 5.
  • Each panel includes donut charts visualizing factor contributions like GDP, life expectancy, and social support.
Screenshot 2024-12-03 at 6 59 49 PM

Scatter Plots

  • Explore how happiness factors correlate with scores through an interactive tooltip featuring scatter plots for factors like GDP and life expectancy.
Screenshot 2024-12-03 at 6 49 57 PM

Interactive Legend

  • Filter countries by score ranges (e.g., >7.0, 6.0-7.0) using the legend. Highlighted countries dynamically adjust based on the selected range.
Screenshot 2024-12-03 at 6 47 33 PM

Key Insights

  • Happiest Countries: Finland, Denmark, and Iceland rank highest, driven by strong social support, high GDP, and life expectancy.
  • Least Happy Countries: Afghanistan and Zimbabwe score lowest, reflecting economic challenges and limited social infrastructure.
  • Geographic Trends: Northern Europe consistently outperforms other regions, while parts of Africa and the Middle East show lower scores.
  • Factor Analysis: GDP, life expectancy, and social support emerge as the strongest predictors of happiness in top-ranking nations.

Final Visualization

  • The project culminates in a polished, user-friendly interface combining aesthetics with data depth. Screenshots below highlight the key components:
Screenshot 2024-12-03 at 7 02 46 PM Screenshot 2024-12-03 at 6 48 11 PM Screenshot 2024-12-03 at 6 48 31 PM Screenshot 2024-12-03 at 6 48 59 PM Screenshot 2024-12-03 at 6 49 21 PM Screenshot 2024-12-03 at 6 49 29 PM Screenshot 2024-12-03 at 6 49 35 PM Screenshot 2024-12-03 at 6 49 42 PM Screenshot 2024-12-03 at 6 49 50 PM Screenshot 2024-12-03 at 6 49 57 PM

Next Steps

This visualization serves as a foundation for deeper analysis and storytelling. Future enhancements could include:

  • Region-specific breakdowns.
  • Year-over-year happiness trends.
  • Predictive modeling to forecast future scores.

This project showcases my ability to design, code, and deliver interactive data visualizations, making it a proud addition to my portfolio.

MIT Licensed