🌍 Public
Viewing a saved revision (read-only)
6bc84aa227a645fabcc22448f1e2737b
Transforming Data
This example demonstrates a data transformation pipeline using the classic Iris dataset. It loads the CSV file containing sepal and petal measurements for three flower species, then uses `d3.csvParse` to parse the data and converts the numeric columns to numbers. The visualization calculates the average sepal length per species using `d3.flatRollup` and `d3.sum`, and displays the resulting summary as JSON text in a `<pre>` element. The code uses D3 v7's selection methods (`select`, `selectAll`, `join`) to manage the output.
AI-generated description