segregation.multigroup.GlobalDistortion

class segregation.multigroup.GlobalDistortion(data, groups=None, metric='euclidean', network=None, distance_matrix=None, normalize=False, **kwargs)[source]

Multigroup Global Distortion Index.

Parameters:
datapandas.DataFrame or geopandas.GeoDataFrame, required

dataframe or geodataframe if spatial index holding data for location of interest

groupslist, required

list of columns on dataframe holding population totals for each group

metricstr (optional; ‘euclidean’ by default)

Distance metric for calculating pairwise distances, Accepts any inputs to scipy.spatial.distance.pdist. Ignored if passing a network or distance matrix

network: pandana.Network object (optional, None by default)

A pandana Network object used to compute distance between observations

distance_matrix: numpy.array (optional; None by default)

numpy array of distances between observations in the dataset

normalization: bool

NOT YET IMPLEMENTED

Attributes:
statisticspandas.Series

KL Divergence coefficients

core_dataa pandas DataFrame

DataFrame that contains the columns used to perform the estimate.

Notes

Based on Bézenac, C., Clark, W. A. V., Olteanu, M., & Randon‐Furling, J. (2022). Measuring and Visualizing Patterns of Ethnic Concentration: The Role of Distortion Coefficients. Geographical Analysis, 54(1), 173–196. https://doi.org/10.1111/gean.12271

Reference: [Bézenac et al., 2022].

__init__(data, groups=None, metric='euclidean', network=None, distance_matrix=None, normalize=False, **kwargs)[source]

Init.

Methods

__init__(data[, groups, metric, network, ...])

Init.