Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of loading data in React with d3

Public visualization

Fork of loading data in React with d3

0 stars0🌍 Public
Bblackbottt
Last edited May 9, 2022
Created on May 9, 2022

This example shows a React application that loads a CSV dataset of world population prospects using D3’s `d3.csv` function, storing the result in component state via `useState` and `useEffect`. While the current code only logs the parsed data to the console, it sets up an SVG canvas with a width of 960 and height of 500, importing `arc` and `pie` from D3 for potential chart rendering. The data originates from a GitHub gist URL, and the ReactDOM render method mounts the app to the root element.

AI-generated description

Making a bar chart with d3 and React!

Comments

Sign in to join the discussion.

MIT Licensed