Transforming Data
✓ Published0🌍 Public
This example demonstrates data transformation by loading the Iris flower dataset from a CSV file and computing the average sepal length for each species. The code uses D3 v7 APIs including `csvParse`, `flatRollup`, and `sum` to process the data, then displays the resulting summary as formatted JSON text in a `<pre>` element. It showcases D3’s data-loading and aggregation capabilities, along with ES6 module imports for modular code organization. The visualization updates dynamically when data is fetched asynchronously.
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