Skip to main content
100%

Load CSV Data

✓ Published0🌍 Public
MMartin Coronel
Last edited Jan 16, 2022
Created on Jan 6, 2022

This example loads a CSV file containing CSS named colors and summarizes its contents in text. The application uses React with the `useState` and `useEffect` hooks to manage the loading state, while D3’s `csv` utility fetches and parses the remote dataset from a GitHub gist. Once loaded, a custom message module reports the file size in kilobytes, row count, and column count, derived from `d3.csvFormat` and the data’s length and columns properties. The interface displays “loading” until the asynchronous request completes, then renders the computed statistics in a simple SVG-agnostic div element.

AI-generated description

A program that loads in some data using D3 utilities, and uses React ot keep track of the data.

MIT Licensed

Similar vizzes