Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

loading data w/ react and d3

Public visualization

loading data w/ react and d3

0 stars1🌍 Public
SSamuele Greco
Last edited Feb 4, 2022
Created on Feb 4, 2022
Forked from follow

This example demonstrates how D3 and React can work together to load and summarize a CSV dataset. The visualization initially displays a “loading...” message, then uses D3’s `csv` function to fetch a remote file of named colors from a GitHub gist. Once the data arrives, React state updates, and a text summary reports the total number of rows, columns, and approximate file size in kilobytes, formatted via `d3.csvFormat`. The rendering relies on React’s `useEffect` and `useState` hooks, with the output drawn as an SVG element in the page.

AI-generated description

load data with d3 and use react for visualization

data about named colors

Comments

Sign in to join the discussion.

MIT Licensed