Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data practice

Public visualization

Viewing a saved revision (read-only)

ae69277bd2574ba5809c53a2057e43d5

Fork of Loading Data practice

0 stars0🌍 Public
KKhatera Alizada
Last edited Jan 21, 2023
Created on Jan 21, 2023
Forked from Loading Data

This example demonstrates a unidirectional data flow pattern: a circle follows the mouse cursor while loading and displaying the Iris dataset. The visualization first fetches `data.csv` containing sepal and petal measurements, parses it with `csvParse`, and converts the numeric string values to numbers. A `pre` element displays the JSON-formatted state data, which transitions from a string `"loading"` to the complete dataset. The code uses D3 v7's `select` and `join` APIs to manage the DOM and implements explicit `setState`/`render` functions to maintain predictable one-way data flow.

AI-generated description

A circle that follows the mouse using unidirectional data flow.