Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Transforming Data

Public visualization

Viewing a saved revision (read-only)

8e9642d0007c4d699b4872f153ddfe8e

Transforming Data

0 stars0🌍 Public
UUmarani Vemula
Last edited Jun 14, 2023
Created on Jun 14, 2023
Forked from Hello VizHub

This example demonstrates how to transform and summarize the Iris dataset using D3’s `flatRollup` and `sum` APIs. It first loads a CSV file asynchronously, parses it with `csvParse`, and converts numeric fields from strings to numbers. The visualization then computes the average sepal length per species and displays the resulting summary as formatted JSON in a `<pre>` element. The code also illustrates local ES6 module imports and state management through a simple `setState` pattern.

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.