Project case study

QuickBite Crisis Analytics Platform

End-to-end Databricks Lakehouse project that detects and responds to a delivery-delay and food-safety crisis, including a crisis-aware churn prediction model.

Problem

A simulated dual crisis at a food-delivery company: severe delivery delays plus a customer trust and food-safety breakdown. Operational metrics degrade first, sentiment worsens next, and churn shows up last, so traditional dashboards only spot the problem after customers have already left. The goal was to predict churn risk early.

Approach

Built a Databricks Lakehouse on a hybrid dataset: a real delivery operations dataset (Kaggle/DoorDash) plus synthetic customer identities, review sentiment and a crisis timeline. Ingested with Auto Loader and refined through Bronze, Silver and Gold Delta tables, orchestrated with Databricks Jobs. Engineered crisis-aware features (RFM score, late order ratio, crisis exposure index, sentiment velocity), trained a Gradient Boosted Trees model optimized for recall on churn, tracked experiments in MLflow, and registered the model as quickbite_churn_predictor. Added H3 geospatial hotspot detection and five dashboards: Executive Overview, SLA & Operations Health, Customer Risk & Retention, Safety & Hygiene map, and Market Congestion.

  • Demand stayed stable while experience degraded: late complaints spiked around October 2025 and safety incidents stayed elevated, yet order volume did not collapse.
  • Operational stress was localized: a small subset of stores repeatedly missed SLA, and congestion varied sharply by market.
  • Recent bad experiences outweighed loyalty: high lifetime-value customers still appeared in high churn-risk segments.
  • Hygiene incidents formed clear geographic clusters, a leading indicator of broader safety issues.
  • The full Bronze, Silver and Gold pipeline runs end to end in about 2 minutes through Databricks Jobs.

Tools

DatabricksPySparkDelta LakeMLflowGradient Boosted TreesH3

Key Insights

  • Demand stayed stable while experience degraded: late complaints spiked around October 2025 and safety incidents stayed elevated, yet order volume did not collapse.
  • Operational stress was localized: a small subset of stores repeatedly missed SLA, and congestion varied sharply by market.
  • Recent bad experiences outweighed loyalty: high lifetime-value customers still appeared in high churn-risk segments.
  • Hygiene incidents formed clear geographic clusters, a leading indicator of broader safety issues.
  • The full Bronze, Silver and Gold pipeline runs end to end in about 2 minutes through Databricks Jobs.

Recommendations

  • Prioritize SLA recovery for the bottom-performing stores and redistribute delivery capacity instead of applying blanket fixes.
  • Trigger retention offers based on recent sentiment and inactivity, not lifetime value alone.
  • Send inspections to hotspot zones and temporarily restrict high-risk stores during peak crisis windows.
  • Rebalance driver supply across markets, using congestion ratios as an early-warning signal.

Customer identities, review sentiment and the crisis timeline are synthetic. Sentiment uses a simplified TextBlob-based approach, and churn labels are highly imbalanced, so the model is optimized for recall rather than accuracy.

Links