Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading and Parsing CSV Data

Public visualization

Viewing a saved revision (read-only)

21b530a2401c4513a30ad79fdd6368be

Loading and Parsing CSV Data

0 stars0🌍 Public
FFábio Correia
Last edited Oct 20, 2022
Created on Oct 20, 2022

This visualization demonstrates how to load and parse CSV data, displaying basic statistics about the dataset in a large text format. It fetches the CSS Named Colors dataset from a GitHub gist and reports the file size in kilobytes, the number of rows, and the number of columns. The example uses D3 v5’s `d3.csv` method for parsing, with an alternative commented-out approach using the Fetch API, `async/await`, and `d3.csvParse`. The resulting information is rendered into an HTML `<pre>` element via the DOM’s `textContent` property.

AI-generated description