Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data

Public visualization

Loading and Parsing CSV Data

0 stars1๐ŸŒ Public
MMichael Bergerson
Last edited Dec 22, 2020
Created on Dec 22, 2020

This example demonstrates how to load and parse CSV data, displaying a summary of the CSS Named Colors dataset that includes file size, row count, and column count. It uses `d3.csv` to asynchronously fetch the remote CSV file and parse it into a tabular structure, then formats the summary using `d3.csvFormat` and `Math.round`. The visualization appears as large text rendered in an HTML `<pre>` element. The code also includes commented alternatives using `fetch`, `async`, and `await` with `d3.csvParse`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed