segregation.singlegroup.SpatialProximity¶
- class segregation.singlegroup.SpatialProximity(data, group_pop_var, total_pop_var, alpha=0.6, beta=0.5, **kwargs)[source]¶
Spatial Proximity Index.
- Parameters:
- data
pandas.DataFrameorgeopandas.GeoDataFrame,required dataframe or geodataframe if spatial index holding data for location of interest
- group_pop_var
str,required name of column on dataframe holding population totals for focal group
- total_pop_var
str,required name of column on dataframe holding total overall population
- alpha
float A parameter that estimates the extent of the proximity within the same unit. Default value is 0.6
- beta
float A parameter that estimates the extent of the proximity within the same unit. Default value is 0.5
- metric
str Can be ‘euclidean’ or ‘haversine’. Default is ‘euclidean’. 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’.
- data
- Attributes:
- statistic
float Spatial Proximity Index
- core_data
pandas.DataFrame A pandas DataFrame that contains the columns used to perform the estimate.
- statistic
Notes
Based on Massey, Douglas S., and Nancy A. Denton. “The dimensions of residential segregation.” Social forces 67.2 (1988): 281-315.
The pairwise distance between unit i and itself is (alpha * area_of_unit_i) ^ beta.
Reference: [Massey and Denton, 1988].
Methods
__init__(data, group_pop_var, total_pop_var)Init.