Skip to main content
100%

Fork of Loading and Parsing CSV Data

✓ Published0🌍 Public
Ggzm17
Last edited Jun 13, 2022
Created on Jun 13, 2022

This example demonstrates how to load and parse CSV data using D3 and the Fetch API. It fetches a list of CSS named colors from a GitHub Gist and displays a summary of that dataset: the file size in kilobytes, the number of rows, and the number of columns. The code highlights two approaches: using `d3.csv` to fetch and parse directly, and an alternative method that uses `fetch` with `async`/`await` alongside `d3.csvParse`. A commented-out section shows an older "pyramid of doom" pattern. The results are rendered as large text in an HTML `<pre>` element, with a font size set via CSS.

AI-generated description
MIT Licensed

Similar vizzes