Skip to main content
100%

Loading and Parsing CSV Data part two

✓ Published0🌍 Public
Jjoneftali
Last edited Sep 18, 2023
Created on Sep 17, 2023

This example demonstrates the basic structure of a CSV file loaded remotely, displaying the number of columns, rows, and approximate size in kilobytes as large text. It uses the `d3.csv` method to fetch and parse a gist-hosted CSS named colors dataset, then relies on `d3.csvFormat` to calculate the byte size. The page also includes commented-out alternatives using `fetch`, `async/await`, and `d3.csvParse` to show other parsing workflows. The rendering is minimal, with a styled `pre` element updating via the DOM’s `textContent`.

AI-generated description

Example of how to use d3 to parse data into a web page

MIT Licensed

Similar vizzes