Fork of #Utrecht2024 TASK: First steps in Svelte
✓ Published0🌍 Public
This is a scatter plot that compares the GDP per capita and life expectancy of countries for the year 2007, with the size of each circle representing the country's population. The SVG is rendered using Svelte, with a `Datapoint.svelte` component drawing semi-transparent circles. The code uses D3's `scaleLinear`, `scaleSqrt`, and `scaleOrdinal` to map the data to positions, radii, and continent-based colors. The data originates from the Gapminder dataset, which is loaded from a CSV file.
AI-generated descriptionTask
- 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
Data
MIT Licensed