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
CChestnut Sea
Last edited Feb 26, 2023
Created on Feb 26, 2023

This example demonstrates loading and parsing CSV data from a remote URL, displaying the file size, row count, and column count in large text. It uses D3 v5’s `d3.csv` method to fetch and parse the CSS Named Colors dataset, then computes metrics from the parsed array and its `.columns` property. The code also includes commented-out alternatives using `fetch` with `async/await` and `d3.csvParse`, highlighting different approaches to asynchronous data loading. The rendered output is a simple HTML `<pre>` element updated via the DOM.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed