Skip to main content
100%

Dataviz 2020_Ep16 - 10. Loading Data with React and D3

✓ Published2🌍 Public

This example demonstrates how to load and summarize a CSV dataset using D3 and React. It displays the file size in kilobytes, row count, and column count from the CSS named colors dataset. The code uses React’s `useState` and `useEffect` hooks to fetch the data via D3’s `csv` function from a GitHub gist URL, then formats it with `d3.csvFormat` and displays the result. React renders the summary text within a `<pre>` element while the data loads.

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