diff --git a/playground/example_inventory_replenishment.html b/playground/example_inventory_replenishment.html new file mode 100644 index 00000000..2dd80718 --- /dev/null +++ b/playground/example_inventory_replenishment.html @@ -0,0 +1,318 @@ + + + + + + tsb — Inventory Replenishment Planning — Examples + + + +
+
+
Initializing playground…
+
+ + ← Back to examples +

📦 Inventory Replenishment Planning

+
Scenario: A retail operations analyst combines daily sell-through with SKU master data to find categories moving fastest and flag items whose on-hand stock is below lead-time demand.
+

Skills you'll use: readCsv, merge, function-valued assign, rolling-style demand features, filters, and pivot tables.

+ +
+

1 · Enrich sales with product master data

+

Parse store/SKU sales, join attributes, and compute inventory value and sell-through.

+
+
+ TypeScript +
+ + +
+
+ + +
Click ▶ Run to execute
+
Ctrl+Enter to run · Tab to indent
+
+
+
+

2 · Calculate reorder points from recent demand

+

Estimate rolling demand per SKU, compare it to on-hand stock, and summarize reorder status.

+
+
+ TypeScript +
+ + +
+
+ + +
Click ▶ Run to execute
+
Ctrl+Enter to run · Tab to indent
+
+
+ + + + + diff --git a/playground/example_marketing_attribution.html b/playground/example_marketing_attribution.html new file mode 100644 index 00000000..19031b5f --- /dev/null +++ b/playground/example_marketing_attribution.html @@ -0,0 +1,314 @@ + + + + + + tsb — Marketing Attribution ROAS — Examples + + + +
+
+
Initializing playground…
+
+ + ← Back to examples +

📣 Marketing Attribution ROAS

+
Scenario: A growth team has campaign spend in spreadsheet-wide format and conversions in event format. Normalize the spend, join conversion facts, and compare return on ad spend across regions and channels.
+

Skills you'll use: melt, multi-column merge, KPI columns, groupby().agg(), pivotTableFull, and top-N selection.

+ +
+

1 · Normalize spend and join conversions

+

Turn wide channel spend into a tidy table, join conversion facts, and compute ROAS and cost per order.

+
+
+ TypeScript +
+ + +
+
+ + +
Click ▶ Run to execute
+
Ctrl+Enter to run · Tab to indent
+
+
+
+

2 · Compare region/channel performance

+

Create a pivot-table scorecard and list the strongest daily placements.

+
+
+ TypeScript +
+ + +
+
+ + +
Click ▶ Run to execute
+
Ctrl+Enter to run · Tab to indent
+
+
+ + + + + diff --git a/playground/example_marketplace_fraud.html b/playground/example_marketplace_fraud.html new file mode 100644 index 00000000..3426220e --- /dev/null +++ b/playground/example_marketplace_fraud.html @@ -0,0 +1,303 @@ + + + + + + tsb — Marketplace Fraud Triage — Examples + + + +
+
+
Initializing playground…
+
+ + ← Back to examples +

🛡️ Marketplace Fraud Triage

+
Scenario: A payments risk team needs a repeatable notebook-style workflow: join live transactions to merchant chargeback history, estimate loss exposure, and produce a review queue plus a segment/device heatmap.
+

Skills you'll use: merge, derived columns, boolean filters, groupby().agg(), nlargestDataFrame, pivotTableFull.

+ +
+

1 · Join risk signals and score transactions

+

Blend transaction-level events with merchant risk metadata, then calculate expected loss and a risk score.

+
+
+ TypeScript +
+ + +
+
+ + +
Click ▶ Run to execute
+
Ctrl+Enter to run · Tab to indent
+
+
+
+

2 · Build a fraud heatmap and merchant leaderboard

+

Summarize exposure by segment/device and rank merchants by estimated loss.

+
+
+ TypeScript +
+ + +
+
+ + +
Click ▶ Run to execute
+
Ctrl+Enter to run · Tab to indent
+
+
+ + + + + diff --git a/playground/examples.html b/playground/examples.html index 52eeeb1f..6a98dcae 100644 --- a/playground/examples.html +++ b/playground/examples.html @@ -229,6 +229,24 @@

Sports League Standings

Product Pricing Tiers

Scenario: An e-commerce merchandiser wants to bucket the catalogue into 4 price tiers (Budget / Mid / Premium / Luxury) and see the count and average margin per tier.

+ + +
🛡️
+

Marketplace Fraud Triage

+

Scenario: A payments risk team joins transactions with merchant chargeback history, scores expected loss, and builds a segment/device heatmap plus a manual review queue.

+
+ + +
📦
+

Inventory Replenishment Planning

+

Scenario: A retail operations analyst combines daily sell-through with SKU master data to calculate reorder points and summarize replenishment risk.

+
+ + +
📣
+

Marketing Attribution ROAS

+

Scenario: A growth team reshapes campaign spend, joins conversion facts, and compares return on ad spend by region and channel.

+