Skip to main content
100%

Steven #Utrecht2024 TASK: First steps in Svelte

✓ Published0🌍 Public
SSteven Nijman
Last edited Jul 6, 2024
Created on Jul 1, 2024

This example creates an interactive bubble chart plotting life expectancy against GDP per capita, with bubble size encoding population and color distinguishing continents. It includes a tooltip that appears on hover, revealing the country name. The visualization is built with Svelte components using d3's `scaleLinear`, `scaleSqrt`, `scaleOrdinal`, and `schemeAccent` for scales, and a Voronoi overlay from `Delaunay` for efficient hover detection. Data is loaded from a CSV file and rendered as SVG circles.

AI-generated description

Task

  • format the data: numbers should be numbers – not strings
  • filter and only use data of the year 2022
  • determine the min and max value of GDP and life expectancy

Original visualization

Interactive version

Data

Gapminder

MIT Licensed

Similar vizzes