Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

viz-happiness-2024

Public visualization

Viewing a saved revision (read-only)

7e2fa4d5622742eabc75fba94f6e1bf8

viz-happiness-2024

0 stars1๐ŸŒ Public
XXiaojun
Last edited Sep 3, 2025
Created on Sep 2, 2025
Forked from Loading Data

This example displays the raw data from the World Happiness Report 2024 as a formatted JSON preview, showing country names and their associated happiness indicators including Ladder score, social support, and GDP per capita. The visualization loads data from a CSV file using the `fetch` API and parses it with `d3.csvParse`, converting numeric fields from strings to numbers. The code renders the parsed data structure in a `<pre>` element, providing a simple text-based investigation of the dataset before any graphical mapping is applied. The implementation follows a state management pattern where data loading triggers a re-render of the view.

AI-generated description

Dataset: World Happiness Report 2024

Source URL: World Happiness Report 2024 Data

Description

This dataset comes from the World Happiness Report 2024, which ranks countries based on their citizensโ€™ self-reported well-being.
The primary measure is the Ladder score (happiness index), which is explained by six key factors: GDP per capita, social support, healthy life expectancy, freedom of choice, generosity, and perceptions of corruption. The dataset also includes confidence intervals and a residual factor.

The goal of using this dataset in our visualization project is to explore how different countries compare in terms of happiness and which factors contribute the most to their scores.

Attribute Types

  • Country name: Categorical
  • Ladder score: Quantitative
  • upperwhisker / lowerwhisker: Quantitative
  • Log GDP per capita: Quantitative
  • Social support: Quantitative
  • Healthy life expectancy: Quantitative
  • Freedom to make life choices: Quantitative
  • Generosity: Quantitative
  • Perceptions of corruption: Quantitative
  • Dystopia + residual: Quantitative