🌍 Public
Viewing a saved revision (read-only)
f1bd0e1db79f42b386e9fb54979b1957
Transforming Data
This example displays summary statistics from the classic Iris flower dataset. After loading the data with `d3.csvParse`, it computes the average sepal length for each species using `d3.flatRollup` and `d3.sum`, then renders the resulting JSON object as text in a `<pre>` element via a D3 data join. The visualization demonstrates importing D3 modules locally, fetching data with `fetch`, and managing asynchronous state updates through a simple state management pattern. It also showcases loading D3 v7 from UNPKG and composing modular ES6 JavaScript files.
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.