Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data using d3 and React

Public visualization

Viewing a saved revision (read-only)

683955e7c33242faaa7adafb87752b63

Loading Data using d3 and React

0 stars0🌍 Public
Bblueyjuice
Last edited Nov 10, 2021
Created on Nov 10, 2021

This example shows an interactive summary of the CSS Named Colors dataset, reporting the file size in kilobytes, the number of rows, and the number of columns. A large, preformatted text element displays the statistics prominently. The code loads the CSV using d3.csv, then derives the file size with `d3.csvFormat(data).length`, while also accessing the parsed data’s `length` and `columns` properties. The example additionally demonstrates an alternative approach using `fetch`, `async`, and `await` with `d3.csvParse`, though that path is commented out.

AI-generated description