Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading Data - Coffee

Public visualization

Viewing a saved revision (read-only)

d0f072fc272d419dbd75ac095f9c0723

Loading Data - Coffee

0 stars0🌍 Public
MMatt Hagger
Last edited Sep 3, 2025
Created on Sep 3, 2025
Forked from Loading Data

A D3.js example demonstrates asynchronous data loading from a CSV file. It displays the raw parsed dataset as JSON in a `<pre>` element, showing coffee purchase records with fields like time of day, coffee type, and price. The visualization uses `d3.csvParse` to convert the CSV text, then explicitly coerces numeric columns like `hour_of_day` and `money` to numbers. State management tracks loading status, transitioning from undefined to `'LOADING'` to the final array of objects via `fetch` and promises.

AI-generated description