Skip to main content
100%

Fork of Loading Data with React and D3

✓ Published0🌍 Public
Vvigneswaran009
Last edited May 10, 2021
Created on May 10, 2021

This example demonstrates how React and D3 can cooperate to load and display external data, with the rendered output shown as a text summary inside a `<pre>` element. It uses React’s `useState` and `useCallback` hooks to manage the asynchronous data-fetching state, while D3’s `csv` function retrieves a CSV file from a GitHub gist containing named CSS colors. Once loaded, React re-renders the component to show the file size in kilobytes, row count, and column count computed via `d3.csvFormat`. The SVG output is commented out, leaving only the text-based data summary visible.

AI-generated description

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

MIT Licensed

Similar vizzes