Skip to main content
100%

Load data to React

✓ Published1🌍 Public
MMayank Kumar
Last edited Sep 23, 2023
Created on Sep 23, 2023
Forked from CSV de

This example shows basic information about a remote CSV dataset, displaying its file size in kilobytes, row count, and column count as plain text. It loads the CSS named colors dataset from a GitHub gist using D3 v7’s `d3.csv` promise method. The data is then formatted with `d3.csvFormat` to calculate the byte size, while `data.length` and `data.columns.length` provide the row and column totals. The result is rendered into a `<pre>` element via `textContent`, with an alternative commented-out approach using `fetch` and `d3.csvParse`.

AI-generated description

A program to load the CSS data and parse it.

MIT Licensed

Similar vizzes