🌍 Public
Viewing a saved revision (read-only)
0f58c86cc184431cae8e3ddb161c2250
D3 data parsing
This example demonstrates how D3 can parse and summarize a remote CSV file, displaying the result as a plain text message. It shows the file’s size in kilobytes, the number of rows, and the number of columns in the dataset. The code uses the `d3.csv` method to fetch and parse the data from a GitHub-hosted CSV of named colors, then retrieves the parsed array’s length and the `columns` property. A fallback approach using `fetch`, `async`/`await`, and `d3.csvParse` is commented out for comparison.
AI-generated descriptionParsing Data with D3.