Transforming Data
✓ Published0🌍 Public
This example loads the classic Iris dataset from a CSV file and uses `d3.csvParse` to convert it into an array of JavaScript objects, coercing the four measurement columns to numbers. It then applies `d3.flatRollup` with `d3.sum` to compute the average sepal length for each species, producing a compact summary table. The result is rendered as formatted JSON inside a `<pre>` element using a data join, with the visualization re-rendering via a simple state-management loop. The code imports utilities like `extent`, `group`, and `bin` but only `flatRollup` and `sum` are actively used.
AI-generated descriptionMIT Licensed