Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Depression vs Happiness

Public visualization

Viewing a saved revision (read-only)

d47da78855414ee6b411024b74f9e536

Depression vs Happiness

0 stars0🌍 Public
NNikithakatta30
Last edited May 16, 2023
Created on May 15, 2023
Forked from Fork of D3 Starter

This visualization plots depression rates against happiness scores for different countries, with each circle representing a country and its position determined by those two metrics. A dropdown menu allows viewers to select a specific year, triggering a smooth transition of the data points. The chart uses D3 v6’s scales (`d3.scaleLinear`), axes (`d3.axisBottom`, `d3.axisLeft`), and SVG circles, with an animated `transition` to update positions when the year changes. Data is loaded from a CSV file via `d3.csv`.

AI-generated description

A demonstration of how to start using D3 version 6.