Transforming Data
✓ Published0🌍 Public
This example loads the classic Iris dataset from a CSV file and computes the average sepal length for each species. The visualization displays this calculated result as formatted JSON text in a `<pre>` element, demonstrating a simple data-transformation pipeline from raw tabular data to a summary table. The code uses D3 v7 functions including `csvParse` for data loading, `flatRollup` and `sum` for aggregation, and `select` for DOM updates. It also showcases ES6 module imports and a state-management pattern for asynchronous data fetching.
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