Skip to main content
100%

World Happiness Report 2022

✓ Published0🌍 Public
Ssamozarif@gmail.com
Last edited Apr 15, 2025
Created on Nov 26, 2024

This interactive visualization of the World Happiness Report 2022 displays a rotating orthographic globe using `d3.geoOrthographic` and `d3.geoPath`, with country circles scaled and color-coded by happiness score. It includes side panels with donut charts for top and bottom-ranked countries, scatter plots analyzing factor correlations, and a legend that filters highlighted circles by score ranges via `updateFilteredCircles`. Data comes from the World Happiness Report 2022 dataset, with SVG rendering and animations for hover interactions.

AI-generated description

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.

<img width="1468" alt="Screenshot 2024-12-03 at 6 46 53 PM" src="https://github.com/user-attachments/assets/a477decf-ebc2-4859-88e9-4168e58fe900">

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.
<img width="1472" alt="Screenshot 2024-12-03 at 6 58 17 PM" src="https://github.com/user-attachments/assets/4fd658b7-81e5-466d-9f8c-6383f37f81ec">

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.
<img width="1470" alt="Screenshot 2024-12-03 at 6 59 49 PM" src="https://github.com/user-attachments/assets/3e20d235-ba08-4a22-bd03-3f83482f4c9d">

Scatter Plots

  • Explore how happiness factors correlate with scores through an interactive tooltip featuring scatter plots for factors like GDP and life expectancy.
<img width="1481" alt="Screenshot 2024-12-03 at 6 49 57 PM" src="https://github.com/user-attachments/assets/31257d79-71a7-4b75-affb-5ff5d1f5231f">

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.
<img width="1474" alt="Screenshot 2024-12-03 at 6 47 33 PM" src="https://github.com/user-attachments/assets/e74cec22-6740-4971-8ace-8af9723b6201">

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:
<img width="1454" alt="Screenshot 2024-12-03 at 7 02 46 PM" src="https://github.com/user-attachments/assets/87a36457-2770-4abc-b83e-b2ee17ec001b"> <img width="1477" alt="Screenshot 2024-12-03 at 6 48 11 PM" src="https://github.com/user-attachments/assets/fab81ae7-afb4-4c5c-b917-7b3c84d57291"> <img width="1485" alt="Screenshot 2024-12-03 at 6 48 31 PM" src="https://github.com/user-attachments/assets/02d77032-9de0-469b-88df-bd843d1a07c9"> <img width="1479" alt="Screenshot 2024-12-03 at 6 48 59 PM" src="https://github.com/user-attachments/assets/f2bb9243-7d0a-4ba3-8660-9765a608648f"> <img width="1480" alt="Screenshot 2024-12-03 at 6 49 21 PM" src="https://github.com/user-attachments/assets/9871b1d3-62b5-4630-9690-2b18d16514c2"> <img width="1476" alt="Screenshot 2024-12-03 at 6 49 29 PM" src="https://github.com/user-attachments/assets/68dc4cc6-4388-4cb9-9912-8cb3ae8605ff"> <img width="1479" alt="Screenshot 2024-12-03 at 6 49 35 PM" src="https://github.com/user-attachments/assets/f7def15b-e377-49ff-9655-5359411c193f"> <img width="1478" alt="Screenshot 2024-12-03 at 6 49 42 PM" src="https://github.com/user-attachments/assets/c5bd9a0a-f631-4d9c-b409-8dcce13319ea"> <img width="1482" alt="Screenshot 2024-12-03 at 6 49 50 PM" src="https://github.com/user-attachments/assets/552e0bfe-5a0e-4a61-a3fe-02db8c7131d5"> <img width="1481" alt="Screenshot 2024-12-03 at 6 49 57 PM" src="https://github.com/user-attachments/assets/f813586f-ad64-4497-8c94-8f527382cd3b">

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

Similar vizzes