Transforming Data
✓ Published0🌍 Public
This example displays the average sepal length for each iris species, computed from the classic Iris dataset. It presents the result as a formatted JSON object rendered in a `<pre>` element, showing a concise text-based summary rather than a graphical chart. The visualization loads the `data.csv` file via `fetch`, parses it with `d3.csvParse`, and converts numeric string fields to numbers. It then uses `d3.flatRollup` with `d3.sum` to calculate the mean sepal length per species, and `d3.select` to update the DOM with the resulting summary.
AI-generated descriptionMIT Licensed