Skip to main content
100%

Loading Data from React & D3

✓ Published0🌍 Public
Mmarouan-ben
Last edited Sep 17, 2023
Created on Sep 17, 2023

This example displays summary statistics about a CSV dataset—file size in kilobytes, row count, and column count—in a large text element. It loads the CSS Named Colors dataset from a GitHub gist using D3 v5’s `d3.csv` method, which returns a promise, and then renders the results via React-compatible DOM manipulation. The code also includes commented-out alternatives using the Fetch API with `async`/`await` and `d3.csvParse`, illustrating different ways to handle asynchronous data loading in a React and D3 context.

AI-generated description
MIT Licensed

Similar vizzes