🌍 Public
Viewing a saved revision (read-only)
e26e716ac71f4e7e9f9b6e8657c2a197
Transforming Data
This example demonstrates data transformation using the Iris dataset, loading CSV data and computing the average sepal length for each species. The visualization displays the resulting summary as formatted JSON text. Built with D3 v7, the code uses `csvParse` to parse the data, `flatRollup` and `sum` to aggregate values, and `select` to render the output. The example also illustrates asynchronous data loading with `fetch` and state management through a custom `setState` pattern.
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.