momepy.simpson_diversity#

momepy.simpson_diversity(values, bins=None, categorical=False)[source]#

Calculates the Simpson’s diversity index of data. Helper function for momepy.Simpson.

\[\lambda=\sum_{i=1}^{R} p_{i}^{2}\]
Parameters
valuespandas.Series

list of values

binsarray, optional

array of top edges of classification bins. Should be equalt to the result of binnng.bins.

categoricalbool (default False)

treat values as categories (will not use bins)

Returns
float

Simpson’s diversity index

See also

momepy.Simpson

Calculates the Simpson’s diversity index