Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Loading and Parsing CSV Data

Public visualization

Fork of Loading and Parsing CSV Data

0 stars0🌍 Public
AAkramjon1995
Last edited Jan 29, 2023
Created on Jan 29, 2023

This example demonstrates how to load and parse CSV data using D3 v5 in a React application. It displays the file size, row count, and column count of a CSS Named Colors dataset fetched from a GitHub gist. The code uses `d3.csv` to fetch and parse the data, then calculates metrics with `d3.csvFormat` and `data.columns.length`. An alternative approach using the Fetch API, `async/await`, and `d3.csvParse` is included as commented-out code. The results render into a large-text `<pre>` element via `textContent`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed