Skip to main content
100%

Transforming Data

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

This example demonstrates data transformation using the Iris dataset. It loads a CSV file and computes the average sepal length for each species, displaying the resulting summary as JSON text in a `<pre>` element. The visualization uses D3 v7 APIs including `csvParse` for data loading, `flatRollup` for grouping and aggregation, and `sum` for calculating totals. The implementation follows a state-based pattern with a `setState` function to manage the asynchronous data fetching and rendering lifecycle.

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