segregation.singlegroup.RelativeCentralization

class segregation.singlegroup.RelativeCentralization(data, group_pop_var, total_pop_var, center='mean', metric='euclidean', **kwargs)[source]

Relative Centralization Index.

Parameters:
datapandas.DataFrame or geopandas.GeoDataFrame, required

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

group_pop_varstr, required

name of column on dataframe holding population totals for focal group

total_pop_varstr, required

name of column on dataframe holding total overall population

centerstr, two-dimension values (tuple, list, array) or integer.

This defines what is considered to be the center of the spatial context under study. If string, this can be set to:

“mean”: the center longitude/latitude is the mean of longitudes/latitudes of all units. “median”: the center longitude/latitude is the median of longitudes/latitudes of all units. “population_weighted_mean”: the center longitude/latitude is the mean of longitudes/latitudes of all units weighted by the total population. “largest_population”: the center longitude/latitude is the centroid of the unit with largest total population. If there is a tie in the maximum population, the mean of all coordinates will be taken.

metricstr

The metric used for the distance between spatial units. If the projection of the CRS of the geopandas DataFrame field is in degrees, this should be set to ‘haversine’.

Notes

Based on Massey, Douglas S., and Nancy A. Denton. “The dimensions of residential segregation.” Social forces 67.2 (1988): 281-315.

A discussion of defining the center in this function can be found in https://github.com/pysal/segregation/issues/18.

Reference: [Massey and Denton, 1988].

Attributes:
statisticfloat

RelativeCentralization Index

core_dataa pandas DataFrame

A pandas DataFrame that contains the columns used to perform the estimate.

__init__(data, group_pop_var, total_pop_var, center='mean', metric='euclidean', **kwargs)[source]

Init.

Methods

__init__(data, group_pop_var, total_pop_var)

Init.