Skip to main content
100%

loading data with react and d3

✓ Published2🌍 Public
NNart Williamson
Last edited Apr 25, 2021
Created on Apr 25, 2021

This example demonstrates how to load and summarize external CSV data within a React application using D3.js. The visualization presents a plain-text summary of the dataset’s size, row count, and column count, displayed in a large `<pre>` element. The code uses React’s `useState` and `useEffect` hooks to fetch the CSV from a GitHub gist via `d3.csv`, then formats the summary with `d3.csvFormat`. The `message.js` module computes the file size in kilobytes and counts rows and columns, while `ReactDOM.render` mounts the component to an SVG-rendered page.

AI-generated description

program that loads in some data using d3

MIT Licensed

Similar vizzes