esda.overlay_entropy

esda.overlay_entropy(a, b, standardize=True, local=False, base=2.718281828459045)[source]

The entropy of how n zones in a are split by m partitions in b, where n is the number of polygons in a and m is the number of partitions in b. This is the “overlay entropy”, since the set of polygons constructed from intersection(a,b) is often called the “overlay” of A onto B.

Larger when zones in a are uniformly split into many even pieces by partitions in b, and small when zones in A correspond well to zones in B.

Parameters:
a : geometry array of polygons

a set of polygons (the “target”) for whom the areal entropy is calculated

b : geometry array of polygons

a set of polygons (the “frame”) that splits a

Returns:

  • (n,) array expressing the entropy of the areal distributions

  • of a’s splits by partition b.

Example

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