Transforming Data
✓ Published0🌍 Public
This example demonstrates data transformation by loading the classic Iris dataset from a CSV file and computing the average sepal length for each species. It uses D3's `csvParse` to parse the data, `flatRollup` and `sum` to aggregate values, then displays the resulting summary as JSON text in a `<pre>` element. The visualization highlights D3 v7’s modular import system and local ES6 modules, with a simple state management pattern that asynchronously fetches and processes the data before rendering.
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