Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

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

Public visualization

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

0 stars1🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed