Skip to main content
A map needs two calls: the stats for the header, and the cells. The deals list draws the neighbourhood view. All of them take the same geometry and the same filters, so their numbers always agree. The geometry can also be a ZIP that a loaded market carries. Send zip=<zip> in place of the point and radius on each call. Keep lat and lng beside it as the reference point for distances.

1. The header stats

array
Each sums to n_deals. by_year goes by purchase year, with undated deals in a year: null row at the end.
array
Does not sum to n_deals: a deal counts under every kind its investor carries. The null rows in both are buyers with no investor id.

2. The cells

Counts per hexagon, to draw as a heat layer. res=8 suits a city or county view, and res=7 suits a whole metro. At neighbourhood zoom, the list below, sorted by distance, is the layer: every row carries the parcel’s coordinates.

Then the drill-down

When the user clicks a row, get the card with its id:
For the table under the map, page the list:
Then follow page.next_cursor. See Pagination.