Transforming Data
✓ Published0🌍 Public
This example demonstrates how D3 can transform raw CSV data into a meaningful summary using the `d3.flatRollup` and `d3.sum` APIs to aggregate the iris dataset by species and calculate the average sepal length. The visualization renders the resulting summary as formatted JSON text inside a `<pre>` element, showcasing D3's data loading, parsing, and transformation workflows. It uses `d3.csvParse` to load and type-convert the dataset, with state management handled through a custom `setState` function. The example highlights dynamic data fetching, transformation, and reactive rendering in a single-page D3 application.
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