🌍 Public
Viewing a saved revision (read-only)
9bf02b0f4b4840289be2ddc5b5cb61e9
Read in csv with d3
This example demonstrates how to fetch and parse a CSV file from a remote URL using D3 v3. It shows the file’s size in kilobytes, row count, and column count as plain text on the page. The code uses the Fetch API to retrieve the CSV, then `d3.csvParse` to convert the text into an array of objects, and accesses `data.length` and `data.columns.length` to summarize the dataset. The data comes from a GitHub gist containing named CSS colors.
AI-generated description