🌍 Public
Viewing a saved revision (read-only)
d518aee8a2fc41e5a92d1bfb9ce63852
Fetch data with D3js
This example demonstrates how to fetch and parse CSV data with D3.js, displaying a summary message in a large preformatted text element. It loads a CSS named colors dataset from a GitHub gist using D3's `d3.csv` method, then calculates and shows the file size in kilobytes, the number of rows, and the column count. The code formats the raw CSV data with `d3.csvFormat` to measure its length, and writes the resulting metrics into the page via `textContent` within a promise handler.
AI-generated descriptionA program that loads and parses some CSV data.