Skip to main content
100%

Parsing

✓ Published0🌍 Public
JJohn Vance
Last edited Oct 4, 2022
Created on Oct 4, 2022

This example uses D3 v5 to parse a CSV file containing CSS named colors and displays facts about the dataset in large text. It first reports the data’s size in kilobytes, then the number of rows, and finally the number of columns. The code fetches the CSV from a remote URL using `d3.csv`, which returns a promise, then computes the statistics with `d3.csvFormat` and the array’s `.length` and `.columns` properties. Alternative approaches using `fetch` and `d3.csvParse` are included but commented out.

AI-generated description
MIT Licensed

Similar vizzes