Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Transforming Data

Public visualization

Viewing a saved revision (read-only)

864af92c98b942f5bfe739a8669859bf

Transforming Data

0 stars0🌍 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.