Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

restaurant-orders-data

Public visualization

Viewing a saved revision (read-only)

127b168679cc490ca5a71b5d163835bf

restaurant-orders-data

0 stars0🌍 Public
Ccsabavath@wpi.edu
Last edited Sep 11, 2025
Created on Sep 4, 2025
Forked from Loading Data

This visualization displays raw restaurant order data from a Kaggle dataset, presenting each record as a JSON object. The example loads the CSV file asynchronously and parses it using D3's `csvParse` function, mapping string attributes like "Order ID" and "Payment Method" to cleaner property names while converting numeric fields such as "Quantity" and "Price" to numbers. The `viz.js` module uses D3's `select` and `join` operations to render the parsed data as a formatted `<pre>` element, with the initial state showing "LOADING" until the fetch completes. The interaction pattern relies on a simple state management system where `setState` triggers a re-render of the visualization.

AI-generated description

Dataset 2: Restaurant Orders

Source:
Restaurant Orders (Kaggle)

This dataset contains 500 synthetic restaurant order records. It includes details about the food items, categories, quantities, prices, payment methods, and order times. The dataset is useful for analyzing customer preferences, sales trends, and ordering behavior.

Attributes and Types

  • Order ID — Categorical, nominal
  • Customer Name — Categorical, nominal
  • Food Item — Categorical, nominal
  • Category — Categorical, nominal (e.g., Drinks, Main Course, Dessert)
  • Quantity — Quantitative, ratio
  • Price — Quantitative, ratio
  • Payment Method — Categorical, nominal (e.g., Cash, Card, Online)
  • Order Time — Ordered, time