segregation.local.LocalDistortion

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

Multigroup Local Distortion Coefficients.

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 of distances between observations in the dataset

normalization:

NOT YET IMPLEMENTED

Attributes:
statisticspandas.Series

KL Divergence coefficients

core_dataa pandas DataFrame

DataFrame that contains the columns used to perform the estimate.

Notes

Olteanu et al. (2019): ‘Segregation through the multiscalar lens’. https://doi.org/10.1073/pnas.1900192116

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

Init.

Methods

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

Init.