Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

CSV Data Loading and Display

Public visualization

Viewing a saved revision (read-only)

c3ea0e7d67a84520ac42af5455cd44be

CSV Data Loading and Display

0 stars2🌍 Public
CCurran Kelleher
Last edited Sep 4, 2025
Created on Sep 4, 2025

This example demonstrates loading the classic Iris dataset from a CSV file and displaying it as formatted JSON text on a web page. The React app uses the `useEffect` hook to fetch data with D3’s `csv` function, then passes it to a separate visualization module. That module uses `selection.selectAll`, `join`, and `text` to render the parsed data into a `<pre>` element, with `.style` adjusting the font size. The dataset, originally published at the UCI Machine Learning Repository, contains measurements of sepal and petal dimensions across three iris species.

AI-generated description