Skip to main content
100%

Fork of Loading and Parsing CSV Data

✓ Published0🌍 Public
AAerogirl10
Last edited Mar 1, 2021
Created on Mar 1, 2021

This example displays basic statistics about a CSV dataset loaded from a remote URL, showing the file size in kilobytes, 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 formats the results with `d3.csvFormat` and `Math.round`. The code also includes commented-out alternatives using the Fetch API with `async`/`await` and `d3.csvParse`, as well as a nested Promise-based approach. The page is a simple HTML document with D3 loaded from a CDN.

AI-generated description
MIT Licensed

Similar vizzes