Transforming Data
✓ Published0🌍 Public
This example loads the classic Iris flower dataset from a local CSV file and uses D3.js version 7. The visualization demonstrates data transformation by grouping measurements by species and calculating the average sepal length for each group using `d3.flatRollup` and `d3.sum`. The result is rendered as a formatted JSON object inside a `<pre>` element, showing the computed summary statistics. The code also illustrates asynchronous data loading via `fetch()` and uses `d3.csvParse` to convert the CSV text into structured data, while showcasing D3's `select` API for DOM manipulation.
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