Viewing a saved revision (read-only)
35d0455ed1dd4bdeae8728981f632483
World Happiness Feature Relationships
This scatterplot explores relationships between world happiness indicators. Users choose which two metrics to plot against each other via dropdown menus, and can click legend items to highlight or isolate countries belonging to a specific region. The visualization uses D3 v5 to render SVG circles, animating their positions when the axis variables change. A tooltip appears on hover, showing the country's values. Data comes from a CSV file loaded with `csv()`. The code uses `d3.scaleLog`, `d3.extent`, and `d3.axisBottom`/`d3.axisLeft` to construct the log-scaled axes, and `d3.scaleOrdinal` with `d3.schemeCategory10` for color encoding.
AI-generated descriptionRemark: Hover on the points, Click on the legend