Skip to main content
100%

Transforming Data

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

This example loads the Iris flower dataset from a local CSV file and computes the average sepal length for each species using D3’s `flatRollup` and `sum` functions. The resulting summary is displayed as a JSON string inside a `pre` element. The code demonstrates local ES6 module imports, fetching and parsing data with `csvParse`, and state management through a `setState` callback that triggers re-rendering. D3 v7 is loaded via UNPKG.

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