Steven #Utrecht2024 TASK: First steps in Svelte
✓ Published0🌍 Public
This example demonstrates a minimal Svelte application that loads and displays raw data from a CSV file using the `d3` library. The code imports CSV data via `import rawData from './data.csv'` and formats each row's string values into native JavaScript types using `d3.autoType`. The result is serialized to JSON and rendered as text within the main element, showcasing the first step in a data-visualization workflow focused on data preparation. The implementation relies on Svelte’s script and style blocks, with `d3` as the only external dependency.
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