# Understanding Supply & Demand in Ride-hailing Through the Lens of Data

[Grab](https://yomu.fyi/company/grab) · Aayush Garg · Feb 20, 2019

**Type:** Explainer

## Summary

Grab measures ride-hailing supply and demand across space and time to resolve geo-temporal allocation mismatches between moving drivers and ride-seeking passengers. The analytics pipeline defines supply as idle online drivers and demand as passengers checking fares within brief time slots, aggregating locations into geohashes. Each driver is mapped across neighbouring demand units and inversely weighted by straight-line distance, which yields the effective supply, supply-demand ratio, and supply-demand difference for each geographic polygon. Grab uses these aggregated metrics to identify marketplace imbalances, deploying driver heatmaps to shift excess supply and passenger travel trend widgets to defer time-insensitive ride requests.

## Context

Drivers are constantly on the move and passenger demand fluctuates heavily within local areas, meaning the closest available drivers are often too far away to fulfill requests efficiently.

## Approach / What changed

Grab aggregates spatial locations into geohashes over small time slices, calculates effective supply by distributing fractions of nearby drivers inversely weighted by straight-line distance to passengers, and aggregates the results into supply-demand ratios and differences.

## Takeaways

- Supply is defined as an idle, online driver at the start of a time window, while demand is defined as a passenger checking fares at a specific pickup location.
- Effective supply assigns a fractional share of each driver to neighbouring demand geohashes using straight-line distance inverse weighting to manage computational complexity.
- Grab operationalises supply-demand metrics through driver heatmaps that guide excess vehicles to high-demand areas and passenger travel widgets that encourage booking during off-peak windows.

**Tags:** [Data Pipelines](https://yomu.fyi/topic/data-pipelines), [Machine Learning](https://yomu.fyi/topic/machine-learning), [Scalability](https://yomu.fyi/topic/scalability)

[Read original post](https://engineering.grab.com/understanding-supply-demand-ride-hailing-data)
