Skip to main content
100%

Fork of Loading and Parsing CSV Data

✓ Published0🌍 Public
HHind ELMASSAOUDI
Last edited Jan 4, 2022
Created on Jan 4, 2022

This example demonstrates the fundamentals of loading and parsing CSV data using D3.js version 5. It fetches the CSS Named Colors dataset from a GitHub Gist and displays a simple text summary of the file size in kilobytes, row count, and column count. The primary approach uses the `d3.csv` function to fetch and parse the remote CSV file, leveraging Promise-based asynchronous handling. The code also includes commented-out alternatives using native `fetch` with `async`/`await` and the `d3.csvParse` function, alongside a nested Promise "pyramid of doom" example. The output is rendered as large text within an HTML `<pre>` element.

AI-generated description
MIT Licensed

Similar vizzes