ContiguityProx

ContiguityProx(geometry='geometry', rule='queen', by=None, islands=None)

Neighbours whose polygons share a border (rook) or any boundary point (queen).

Polygons are taken as drawn. Needs svy-sae[spatial].

Parameters

Name Type Description Default
geometry str Column of area polygons in the fitted data. 'geometry'
rule Literal['queen', 'rook'] “rook” needs a shared border, “queen” any shared boundary point. 'queen'
by Literal['border_length'] | None None counts every neighbour equally; “border_length” weights it by the shared border, in the geometry’s units: project lon/lat polygons first, or degrees of longitude count as distance. Needs rule="rook". None
islands Literal['nearest'] | None “nearest” links each area left without neighbours to the closest polygon, one way. None

Methods

Name Description
pairs One row per (area, neighbour) with the shared border and the proximity.

pairs

pairs(frame, *, area)

One row per (area, neighbour) with the shared border and the proximity.