Skip to main content
100%

Transforming Data

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

This example demonstrates how D3 can transform raw CSV data into a meaningful summary using the `d3.flatRollup` and `d3.sum` APIs to aggregate the iris dataset by species and calculate the average sepal length. The visualization renders the resulting summary as formatted JSON text inside a `<pre>` element, showcasing D3's data loading, parsing, and transformation workflows. It uses `d3.csvParse` to load and type-convert the dataset, with state management handled through a custom `setState` function. The example highlights dynamic data fetching, transformation, and reactive rendering in a single-page D3 application.

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