Skip to main content
100%

Transforming Data

✓ Published0🌍 Public
VVinay Vemuri
Last edited Jun 26, 2023
Created on Jun 26, 2023

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 description
MIT Licensed

Similar vizzes