Skip to main content
100%

LoadCsv

✓ Published1🌍 Public
JJimMaltby
Last edited Jun 18, 2022
Created on Jun 3, 2022

This example demonstrates how D3 loads and processes CSV data, specifically highlighting the behavior of `d3.csv` with a custom row-accessor function. The code defines an inline array that mimics CSV content, then uses `d3.csv` to parse it while trimming, lowercasing, and computing a derived `duration` field. Rows where the end value is not greater than the start value are filtered out. The processed result is logged to the console along with the column keys, showing which columns remain after transformation. It uses D3 v5’s promise-based `d3.csv` API and the `data.columns` property to inspect parsed fields.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts and Observable: selection.join.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes