Question
Design a geospatial analytics platform that answers questions like 'what was average rider wait time per neighborhood-sized area, per hour, over the last year' across a city with billions of historical trips. Analysts also want to draw an arbitrary polygon on a map and get aggregate metrics inside it, and to compare adjacent areas. Latency target is interactive (seconds) for dashboards. Discuss the spatial bucketing scheme, why a hierarchical hex grid like H3 helps, the pre-aggregation strategy, and the trade-off between fixed grid cells and arbitrary polygon queries.
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.