Transforming Data
✓ Published0🌍 Public
This example loads the Iris flower dataset from a local CSV file and computes the average sepal length for each species using D3’s `flatRollup` and `sum` functions. The resulting summary is displayed as a JSON string inside a `pre` element. The code demonstrates local ES6 module imports, fetching and parsing data with `csvParse`, and state management through a `setState` callback that triggers re-rendering. D3 v7 is loaded via UNPKG.
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