Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data in React using D3

Public visualization

Loading Data in React using D3

0 stars0🌍 Public
MManbirJudge
Last edited Oct 17, 2021
Created on Oct 17, 2021

This example demonstrates how to load and display information about a CSV dataset in a React application using D3. It shows the file size, row count, and column count of a named colors dataset fetched from a GitHub gist. The code uses React’s `useState` and `useEffect` hooks to manage asynchronous data loading, while `d3.csv` retrieves and parses the data. A separate `Message` component computes the statistics and formats the output text, which is rendered inside a `<pre>` element.

AI-generated description

A program that loads data using D3 and uses React state to keep track of data.

Comments

Sign in to join the discussion.

MIT Licensed