Skip to main content
100%

Transforming Data

✓ Published0🌍 Public
Vvineelaramulapalli32
Last edited Jul 17, 2023
Created on Jul 17, 2023
Forked from Hello VizHub

This example demonstrates how to transform the classic Iris dataset by loading a CSV file and calculating the average sepal length for each species. The visualization displays the resulting summary as a JSON-formatted list of objects, showing the species name alongside its computed average. The code uses D3 v7 APIs including `csvParse` to parse the data, `flatRollup` to group and aggregate values, and `sum` to calculate totals. It also showcases ES6 module imports, a fetch-based data-loading pattern, and a state management system for handling asynchronous data retrieval.

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