Englishفارسی

Company 1: growth, margin and the cost of every order

A synthetic online food-delivery marketplace, followed from single orders to a management decision on growth versus margin. Not affiliated with any real company; methodology is in the Sources section.

Executive overview — KPI scorecard

Latest month versus the previous month for 34 KPIs in seven groups. Each tile shows the value, the change, and a 12-month sparkline; green/red marks whether the move is good or bad for the business. Tiles tagged “3M” use a trailing 3-month window (sign-up-driven KPIs; see the Sources section). Hover a tile for its definition.

GMV and delivered orders by month

Contribution profit by city

Financial performance

Revenue, cost structure and what drives contribution margin. The headline contribution margin is shown before promotions; the after-promotion view charges the platform-funded discounts against it.

Contribution margin: before vs. after promotions

The gap between the lines is the promotion cost, as a share of platform revenue.

Revenue mix (last 3 months)

Cost structure vs. platform revenue

Margin driver decomposition (first vs. last month)

Unit economics

What one delivered order earns and costs the platform — total, by cuisine, by restaurant tier and by payment method.

Unit-economics waterfall — $ per order

Revenue vs. cost to serve per order

Contribution margin by cuisine

By restaurant tier

By payment method

Customers & retention

Acquisition quality, retention, segments, subscription impact and how concentrated revenue is across the customer base.

Active customers: new vs. returning

Month-1 retention by month

Customers by segment

Share of customers vs. share of profit

Segments whose profit share exceeds their customer share are over-earning.

Subscribers vs. non-subscribers

Revenue concentration (Lorenz curve)

Cohort retention heatmap (% of sign-up cohort still ordering)

Restaurants & supply

Which restaurants create profit, how concentrated volume is, and how supply keeps up with demand.

Restaurant GMV vs. contribution margin (each dot = one restaurant)

Restaurants by quadrant

Supply: active restaurants and orders per restaurant

Delivery operations

Speed, reliability, cancellations, demand peaks, city-level performance and rider productivity.

On-time rate

Cancellation rate

Demand heatmap — orders by weekday × hour

Average delivered orders per day, last 3 months.

Why orders are cancelled

City scorecard

Green = better, red = worse within each column.

Rider productivity

By vehicle type

Customer rating by delivery delay

Marketing efficiency & promotions

Observed acquisition spend by channel, CAC versus assumptions, LTV:CAC and the real cost of promotions.

Observed marketing spend by channel

Blended CAC by month

CAC: planning assumption vs. observed (last 3 months)

Observed LTV : CAC by channel

Dashed line = break-even (1.0). A healthy channel is typically 3 or higher.

Promotion intensity

Orders with vs. without a promotion

Contribution after promotions is the true per-order profit of a promoted order.

Forecast & strategic plan

Twelve-month outlook with 80% intervals and the plan required to reach +25% orders and +2 pp contribution margin.

Delivered orders — history, forecast and 80% interval

Model selection (rolling-origin validation)

Strategic plan: +25% orders and +2 pp margin

Scenarios & promotion-budget optimization

Downside / base / upside profit scenarios and the optimal allocation of a fixed promotion budget across city × segment cells.

Scenarios — contribution profit

Optimization: baseline vs. optimal spend (top cells)

Sources & methodology

Everything on this page is computed from the synthetic dataset in this repository. No real company data is used.

ComponentApproach
Data generationReproducible NumPy/pandas simulation (fixed seed) of ~12,000 customers, 320 restaurants, 520 riders and ~167k orders over 17 months, with seasonality, a growth trend, churn/retention curves and realistic financial relationships. v2 adds two tables: observed marketing spend by month × channel, and rider online/busy hours.
KPI layer34 scorecard KPIs computed from the order table in src/analytics/kpis.py. Delivered orders = Delivered + Refunded. Contribution profit is before promotions (the model’s headline definition); “after promotions” subtracts promotion cost. The scorecard compares the latest month with the previous month.
ForecastingSeasonal-naive, moving-average and Holt-Winters models compared via rolling-origin (temporal) validation; the best model is selected per metric by WAPE.
OptimizationSciPy trust-constr solves a concave-response promotion-budget allocation across city × segment cells, maximizing incremental contribution profit under a fixed budget.
SegmentationRule-based on realized recency / frequency / monetary value and subscription status — not random labels.
KPI windowsCustomer sign-ups are generated over a fixed window that ends on 2026-08-23, so the final month holds only part of its sign-ups. Sign-up-driven KPIs (new customers, new-customer share, marketing spend, CAC, marketing % of revenue) therefore use a trailing 3-month window, tagged “3M”.
LimitationsAll data is synthetic: patterns such as retention, channel economics and city margins are model outputs, not market evidence. Per-order unit economics use the last 3 months; LTV is the observed lifetime profit to date, not a projection. Marketing spend and rider hours are generated tables too, with built-in CAC inflation for paid channels, so the gap between “observed” and planning CAC is a modelled outcome, not market evidence.