Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Grocery Store Sales Data Loading

Public visualization

Viewing a saved revision (read-only)

b00e570f7e874fe682e86baf9ce8c3c7

Grocery Store Sales Data Loading

0 stars0🌍 Public
EEmily Hudson
Last edited Sep 4, 2025
Created on Sep 3, 2025
Forked from Loading Data

This example demonstrates loading and displaying a grocery store sales dataset from an external CSV file. The visualization fetches the data using the Fetch API, parses it with `d3.csvParse`, and renders the parsed rows as formatted JSON text in a `<pre>` element using D3’s `select` and data join. The code uses D3 v7 and manages state transitions from an initial undefined value through a loading phase to the final parsed array. The dataset includes sales records with fields such as product name, total amount, and loyalty points from multiple store locations.

AI-generated description