ziadatalabs's picture
Upload folder using huggingface_hub
6e739a0 verified
|
Raw
History Blame Contribute Delete
3.13 kB
metadata
license: cc-by-nc-4.0
tags:
  - synthetic
  - ecommerce
  - retail
  - relational
  - tabular
task_categories:
  - tabular-classification
  - tabular-regression
pretty_name: Free Synthetic E-commerce Twin
size_categories:
  - 10M<n<100M

Free Synthetic E-commerce Twin

A fully synthetic, internally-consistent e-commerce business across seven relational tables — customers, products, sessions, orders, order_items, returns, and support_tickets — that actually join. Every foreign key resolves, the money reconciles (each order total equals the sum of its line items; each customer's lifetime spend equals their delivered orders net of refunds), and customer behavior follows their segment. No real people, businesses, or transactions.

Schema

customers (1,000,000 rows) — customer_id, signup_date, region, segment (new/casual/loyal/vip), lifetime_orders, lifetime_spend, email_domain

products (50,000 rows) — product_id, category, subcategory, price, cost, brand, launch_date, avg_rating

sessions (7,455,296 rows) — session_id, customer_id (FK), session_start, device, channel, pages_viewed, converted

orders (1,075,683 rows) — order_id, customer_id (FK), session_id (FK), order_date, status (placed/shipped/delivered/returned/cancelled), item_count, order_total, payment_method

order_items (4,280,732 rows) — order_item_id, order_id (FK), product_id (FK), quantity, unit_price, line_total

returns (400,293 rows) — return_id, order_id (FK), order_item_id (FK), product_id (FK), return_date, reason, refund_amount

support_tickets (66,938 rows) — ticket_id, customer_id (FK), order_id (FK), created_date, category, priority, status, resolution_days

Format

Snappy-compressed Parquet, one file per table.

Quick start

import pandas as pd
customers = pd.read_parquet("customers.parquet")
orders = pd.read_parquet("orders.parquet")
items = pd.read_parquet("order_items.parquet")
from datasets import load_dataset
ds = load_dataset("ziadatalabs/FreeSyntheticEcommerceTwin")
import duckdb
duckdb.sql("""
  SELECT c.segment, COUNT(DISTINCT o.order_id) orders, SUM(o.order_total) revenue
  FROM 'customers.parquet' c
  JOIN 'orders.parquet' o USING (customer_id)
  GROUP BY c.segment
""").show()

Notes

  • Fully synthetic — no real customers, products, orders, or businesses.
  • The numbers reconcile: order_total = sum of its order_items line_totals; customer lifetime_spend/lifetime_orders = their actual delivered orders net of refunds.
  • Segment drives behavior: vip/loyal customers have more sessions, higher conversion, larger baskets, and higher spend than casual/new.
  • Returns correlate with product category (apparel returns most); a returned item creates a matching returns row, and support tickets are far more likely on returned or cancelled orders.

License & Usage

CC BY-NC 4.0. Free for non-commercial use.

Want more free datasets? Hit the ❤️ and follow. And we take requests — tell us what synthetic data you need, and we'll build it.


Zia Data Labs — zia.data.team@protonmail.com