Transforming Data
✓ Published0🌍 Public
This example demonstrates how to transform the classic Iris dataset by loading a CSV file and calculating the average sepal length for each species. The visualization displays the resulting summary as a JSON-formatted list of objects, showing the species name alongside its computed average. The code uses D3 v7 APIs including `csvParse` to parse the data, `flatRollup` to group and aggregate values, and `sum` to calculate totals. It also showcases ES6 module imports, a fetch-based data-loading pattern, and a state management system for handling asynchronous data retrieval.
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