Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading Data with React & D3

Public visualization

Fork of Loading Data with React & D3

0 stars0🌍 Public
YYing-Liu21
Last edited Apr 13, 2021
Created on Apr 13, 2021

This example demonstrates how to fetch and display a summary of a CSV dataset of CSS named colors. It uses React state to manage the loading lifecycle, initially showing a loading message, then reporting the dataset’s size in kilobytes, row count, and column count after the data arrives. The code employs the `d3.csv` function to load the data from a GitHub gist, `d3.csvFormat` to calculate its byte size, and React hooks (`useState` and `useEffect`) to handle asynchronous updates.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.

Comments

Sign in to join the discussion.

MIT Licensed