H3 cells, rings and aggregation 00:00:01 Count deliveries without storing one pin on the map A dispatcher has three hundred forty-seven deliveries in one patch of the city. She wants one colored region on the map for that count. Where will the next pin be counted? Choose resolution eight. Index each delivery coordinate into its H three cell, then increment the counter for that cell and time window. A second delivery at the same doorway adds one more. The cell count says how many delivery events fell into that bucket. It cannot reconstruct their individual coordinates, and it does not measure the number of distinct customers. A heat map can work from aggregate counts. If you also promise to find every courier within a kilometre, keep suitable coordinates or a separate point index. A cell count cannot tell you which doorway a courier used. 00:00:50 Change the resolution At resolution nine the cells are smaller. Two pins that once shared a display cell can now fall into different buckets, revealing a pattern that one large count concealed. For a hierarchical rollup, find the logical resolution-eight parent of each resolution-nine cell and add the child counts. Each child has one logical parent and contributes once. The membership relation between identifiers is exact. The geographical outlines of fine hexagons do not tile the outline of a coarse hexagon exactly. That difference matters for edge points. Choose an accounting convention and document it. Rolling a fine cell up through its logical parent can put an edge point in a different coarse bucket than indexing that original point directly at the coarse resolution. 00:01:39 Walk a disk around an origin To inspect neighbors, select a hub cell. A disk of radius one in the grid includes every cell at most one edge step away, including the hub itself. Around an ordinary hexagonal hub, six neighbors and the center make seven cells in that disk. A ring at distance exactly one excludes the hub and contains the six neighbors. The geometry of a spherical grid includes pentagons. Code that assumes every ring has six cells will fail on a real pentagon even when the input identifier is perfectly valid. Try changing the center to a pentagon. There are twelve pentagons at every resolution. A pentagon has five edge neighbors, so its one-hop disk has six cells when the center is included. 00:02:25 Hops are not kilometres A grid hop counts edges crossed. It has no fixed length in kilometres. Two people on opposite sides of one edge can be closer than two people in the same cell. To promise a true radius, I first cover the area with H3 cells, then filter points inside the actual circle using precise distance checks. Even at one resolution, the area of cells varies. Use the actual cell area when the report claims deliveries per square kilometre. For a radius promise, construct a conservative cover with an appropriate method. A set selected only by testing cell centers can leave part of the search circle uncovered. Filter candidate points using their actual coordinates. 00:03:08 Compare like with like Suppose two places record three hundred deliveries in the same day. At one square kilometre that is three hundred per square kilometre. At two square kilometres it is one hundred fifty. I record the resolution and the time window—say, 24 hours—so I can compare reports across different periods reliably. Check ordinary hexagons, one of the pentagons, and deliveries near a coarse boundary. Confirm that logical rollups preserve the total number of delivery events. When a hot spot shifts, ask whether demand changed, the reporting window changed, or the denominator changed. Label the resolution and the time interval alongside the legend so the same color means the same thing.