Skip to main content
100%

Loading Data with React & D3 (information csv data permis US)

✓ Published1🌍 Public
Ddassermouna
Last edited Jul 23, 2021
Created on Jul 4, 2021

This example demonstrates loading a real-world US permanent visa dataset using D3’s `csv` utility within a React application. The visualization presents a plain-text summary of the raw CSV data, displaying its size in kilobytes, row count, and column count. The code uses React’s `useState` and `useEffect` hooks to manage asynchronous data loading and re-render the page once the data arrives. The dataset is fetched from a remote Gist URL, and the summary is generated using `d3.csvFormat` to measure the data size before calculating the descriptive statistics.

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.

MIT Licensed

Similar vizzes