Skip to main content
100%

Grocery Store Sales Data Loading

✓ Published0🌍 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

This dataset contains information about grocery store sales from multiple location. Some of the fields of this dataset include product name, total transation amount, loyalty points, etc.

Here is the link to the Kaggle Dataset: https://www.kaggle.com/datasets/pratyushpuri/grocery-store-sales-dataset-in-2025-1900-record

  • cusomter id -- id given to each customer that makes a transaction at the store (will not be used as data)
  • store name -- name of the store that the customer attended (categorical variable)
  • transaction date -- the date in which the customer bought the item (date)
  • aisle -- the number of the aisle where the product was shelved (quantitative variable)
  • product name -- the name of the product bought by the customer (categorical variable)
  • quantity -- the number of items bought by the customer (quantitative variable)
  • unit price -- the cost of one of the chosen product measured in dollars (quantitative variable)
  • total amount -- the summed cost of the items purchased by the customer measured in dollars (quantitative variable)
  • discount amount -- the amount removed from the total price of the purchase measured in dollares (quantitative varible)
  • final amount -- the total amount paid by the customer after factoring in the discount measured in dollars (quantitative variable)
  • loyalty points -- the amount of loyalty points earned by the customer for this purchase (quantitative variable)
MIT Licensed

Similar vizzes