🌍 Public
Viewing a saved revision (read-only)
601ea26f1fc34cb5b79bcfa1a9bfde25
viz-happiness-2024
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