restaurant-orders-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 descriptionDataset 1: Restaurant Orders
Source:
Restaurant Orders Dataset
This dataset contains synthetic restaurant order records for
practicing data analysis and visualization. It includes
order ID, customer name, food item, category, quantity,
price, payment method, and order time.
No real customer information is included.
Attributes and Types
- Order ID — Quantitative, nominal (identifier)
- Customer Name — Categorical, nominal
- Food Item — Categorical, nominal
- Category — Categorical, nominal (Main, Dessert, Starter, etc.)
- Quantity — Quantitative, ratio
- Price — Quantitative, ratio
- Payment Method — Categorical, nominal (Cash, Card, Online)
- Order Time — Ordered, time-series (string or Date)