Activity6_question 3
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed