Transforming Data
✓ Published0🌍 Public
This example demonstrates data transformation using the Iris dataset. It loads a CSV file and computes the average sepal length for each species, displaying the resulting summary as JSON text in a `<pre>` element. The visualization uses D3 v7 APIs including `csvParse` for data loading, `flatRollup` for grouping and aggregation, and `sum` for calculating totals. The implementation follows a state-based pattern with a `setState` function to manage the asynchronous data fetching and rendering lifecycle.
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