esda.completeness

esda.completeness(a, b, local=False, base=2.718281828459045)[source]

The completeness of the partitions of polygons in a to those in b. Closer to 1 when all polygons in a are fully contained within polygons in b. From [Nowosad and Stepinski, 2018]

Parameters:
a : geometry array of polygons

array of polygons

b : geometry array of polygons

array of polygons

local : bool (default: False)

whether or not to provide local scores for each polygon. If True, the completeness for polygons in a are returned.

scale : bool (default: None)

whether to scale the completeness score(s). By default, completeness is is scaled for local scores so that the average of the local scores is the overall map completeness. If not local, then completeness is returned unscaled. You can also set local=True and scale=False to get raw components of the completeness, whose sum is the completeness for the entire map. Global re-scaled scores (local=False & scale=True) are not supported.

base : bool (default=None)

what base to use for the entropy calculations. The default is base e, which means entropy is measured in “nats.”

Example

>>> import geopandas
>>> from esda import completeness
>>> from geodatasets import get_path
>>> ch1 = geopandas.read_file(get_path('geoda.charleston1'))
>>> ch2 = geopandas.read_file(get_path('geoda.charleston2'))
>>> completeness(ch1, ch2)
np.float64(0.7929256909435175)