Skip to main content
100%

Loading data with React and D3

✓ Published0🌍 Public
Aakiannejad123
Last edited Mar 31, 2021
Created on Mar 22, 2021
Forked from Smily face part I

This example demonstrates how to load and display a CSV dataset using React and D3. The application fetches world population data from a GitHub gist URL via `d3.csv` inside a React `useEffect` hook, storing the parsed result in component state with `useState`. While the data loads, a "RETRIEVING..." message appears. The code initializes `scaleBand` and `scaleLinear` scales for potential bar chart rendering, though the visualization itself is not completed. React 17 and D3 v6 are loaded from CDNs, with the app mounted into the root element via `ReactDOM.render`.

AI-generated description

a program that loads in d3 utilities and data with reat and d3

MIT Licensed

Similar vizzes