Skip to main content
100%

Activity6_question 3

✓ Published0🌍 Public
Ttallapanenisahithi@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Activity6_task 3

This scatter plot visualizes World Happiness Report data from 2015–2023, comparing GDP per capita against happiness scores for three selected countries: the United States, Japan, and India. Each circle represents a yearly observation, colored by country via a categorical color scale. The visualization uses D3 v6 to load CSV data from a GitHub repository, with axes rendered using `axisBottom` and `axisLeft`, and scales defined through `scaleLinear` and `scaleOrdinal`. A custom legend, built with SVG rectangles and text, identifies the countries, while the plot dynamically sizes to the browser window.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes