Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data with React and D3

Public visualization

Loading Data with React and D3

0 stars2🌍 Public
Vvigneswaran009
Last edited May 10, 2021
Created on May 10, 2021

This example demonstrates how to load external data in a React application using D3 utilities, displaying the dataset's size, row count, and column count as plain text. It uses the `useState` and `useEffect` hooks to manage asynchronous data loading via `d3.csv` from a GitHub Gist containing CSS named colors. Once fetched, the data is stored in React state and formatted with `d3.csvFormat` to compute its kilobyte size. The interface renders the summary information inside a `<pre>` element, switching from a "loading..." message to the final statistics when the data arrives.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data

Comments

Sign in to join the discussion.

MIT Licensed