Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Fork of Loading Data with React & D3

0 stars0🌍 Public
VVenkat
Last edited Sep 13, 2021
Created on Sep 13, 2021

This example demonstrates how React and D3 can work together to load and summarize a dataset of CSS named colors. The application fetches CSV data from a GitHub gist using the `d3.csv` function, then stores the result in React state via the `useState` and `useEffect` hooks. While the data is loading, the interface shows a “Loading...” message; once available, it displays a text summary built with `d3.csvFormat` that reports the file size in kilobytes, the number of rows, and the number of columns. The visualization uses React 16.9, D3 v5, and the `ReactDOM.render` method to mount the component into the DOM.

AI-generated description

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

Comments

Sign in to join the discussion.

MIT Licensed