Transforming Data
✓ Published0🌍 Public
This visualization 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’s `csvParse` to import raw comma-separated values, then parses numeric fields with unary plus operators. It applies `flatRollup` and `sum` from D3 to group the data by species and calculate the mean aggregate. The resulting summary is rendered as a JSON string inside a `<pre>` element, showing the pipeline from raw data to structured analysis. The example fetches the CSV asynchronously using browser `fetch` and the Promise API.
AI-generated descriptionA program that loads and parses some CSV data: CSS Named Colors.
See also:
MIT Licensed