Skip to main content
100%

Transforming Data

✓ Published0🌍 Public
SSharankumar02
Last edited Jun 18, 2023
Created on Jun 18, 2023
Forked from Hello VizHub

This example demonstrates how to transform the classic Iris dataset by computing the average sepal length for each species using `d3.flatRollup` and `d3.sum`, then displaying the aggregated results as a JSON summary in a `<pre>` element. The visualization loads CSV data asynchronously via `fetch`, parses it with `d3.csvParse`, and converts numeric fields before processing. Built with D3 v7 and ES6 modules, it showcases lazy state management where data is fetched and transformed only once on initial render.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes