Skip to main content
100%

Transforming Data

✓ Published0🌍 Public
Ssrikkanth05
Last edited Jun 14, 2023
Created on Jun 14, 2023
Forked from Hello VizHub

This example loads the classic Iris flower dataset from a local CSV file and uses D3.js version 7. The visualization demonstrates data transformation by grouping measurements by species and calculating the average sepal length for each group using `d3.flatRollup` and `d3.sum`. The result is rendered as a formatted JSON object inside a `<pre>` element, showing the computed summary statistics. The code also illustrates asynchronous data loading via `fetch()` and uses `d3.csvParse` to convert the CSV text into structured data, while showcasing D3's `select` API for DOM manipulation.

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