Skip to main content
100%

Loading and Parsing CSV Data

✓ Published0🌍 Public
CChinedu Ozodi
Last edited Oct 7, 2021
Created on Oct 7, 2021

This example demonstrates the basic workflow of loading and parsing CSV data with D3. It fetches a CSV file containing CSS named colors from a GitHub gist and displays summary statistics—file size in kilobytes, row count, and column count—in a large text element. The code uses `d3.csv` and the Promise-based `.then()` method to handle asynchronous loading. An alternative commented-out section shows the same process using the Fetch API with `async`/`await` and `d3.csvParse`. The final output presents three lines of calculated metrics derived from the parsed dataset.

AI-generated description
MIT Licensed

Similar vizzes