Skip to main content
Public

Share visualization

Loading preview…

World Happiness Feature Relationships

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

World Happiness Feature Relationships

0
Mmkt-ds
Last edited Oct 31, 2019
Created on Sep 24, 2019
Forked from Log Scale Example

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 description

Remark: Hover on the points, Click on the legend

Comments

Sign in to join the discussion.

MIT Licensed