Skip to main content
100%

Loading data with React and d3

✓ Published0🌍 Public
RRajaeKrib
Last edited Aug 15, 2021
Created on Aug 15, 2021

This example demonstrates how React and d3 can work together to load and display a CSV dataset, showing the file size, row count, and column count as plain text. The React component uses the `useState` and `useEffect` hooks to manage loading state and fetch data once on mount via `d3.csv`, while `d3.csvFormat` calculates the data size. The message updates from "Loading..." to the summary once the data from the GitHub-hosted CSV file arrives. It uses React 16 and d3 v7, with ReactDOM rendering the result into the page.

AI-generated description

A program that uses d3 to import data, and use react state to keep track of data.

MIT Licensed

Similar vizzes