DistanceProx

DistanceProx(x, y, distance, by=None, power=1.0, lonlat=False)

All areas within distance of each other, from one point per area.

Parameters

Name Type Description Default
x str Columns of each area’s point coordinates in the fitted data. required
y str Columns of each area’s point coordinates in the fitted data. required
distance float Largest distance between neighbours, in km with lonlat. required
by Literal['inverse_distance'] | None None counts every neighbour equally; “inverse_distance” gives a neighbour 1 / distance**power. None
power float Exponent of the inverse distance. 1.0
lonlat bool Read x and y as longitude and latitude in degrees; distances are then great-circle km. False

Methods

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

pairs

pairs(frame, *, area)

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