Skip to main content
100%

Fork of Loading Data with React & D3

✓ Published0🌍 Public
Aadamacass
Last edited Sep 10, 2021
Created on Sep 10, 2021

This example demonstrates the use of React state to manage asynchronous data loading in a D3 visualization. It fetches a CSV file containing CSS named colors from a GitHub gist and displays a summary of the data, including its size in kilobytes, row count, and column count. The code uses React's `useState` and `useEffect` hooks to trigger the load and store the result, while D3's `csv` utility parses the remote data. The rendered output is plain text within a `<pre>` element, constructed by the `message` function, which also employs `d3.csvFormat` to calculate the data's byte size.

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.

MIT Licensed

Similar vizzes