Skip to main content
100%

Fork of Fork of Loading Data with React & D3

✓ Published0🌍 Public
RReymond Mesuga
Last edited Mar 11, 2021
Created on Mar 11, 2021

This example shows a React app that asynchronously loads a CSV dataset of CSS named colors using D3’s `csv` utility, then displays a text summary of its contents. While the data is loading, the interface shows “Loading...”; once resolved, the app renders a `<pre>` block with the file size in kilobytes, the number of rows, and the number of columns. The code uses React hooks (`useState` and `useEffect`) to manage state and trigger the data fetch, with a custom `message` function that relies on `d3.csvFormat` to compute the byte length. The visualization is minimal, focusing on data loading behavior rather than graphical rendering.

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