segregation.decomposition.DecomposeSegregation¶
-
class
segregation.decomposition.
DecomposeSegregation
(index1, index2, counterfactual_approach='composition')[source]¶ Decompose segregation differences into spatial and attribute components.
Given two segregation indices of the same type, use Shapley decomposition to measure whether the differences between index measures arise from differences in spatial structure or population structure
Examples
Several examples can be found at https://github.com/pysal/segregation/blob/master/notebooks/decomposition_wrapper_example.ipynb.
Methods
plot
([plot_type, figsize, city_a, city_b, …])Plot maps or CDFs of urban contexts used in calculating the Decomposition class.
-
__init__
(index1, index2, counterfactual_approach='composition')[source]¶ Decompose segregation differences into spatial and attribute components.
Given two segregation indices of the same type, use Shapley decomposition to measure whether the differences between index measures arise from differences in spatial structure or population structure
- Parameters
- index1segregation.SegIndex class
First SegIndex class to compare.
- index2segregation.SegIndex class
Second SegIndex class to compare.
- counterfactual_approachstr, one of {“composition”, “share”, “dual_composition”}
The technique used to generate the counterfactual population distributions.
- Attributes
- c_sfloat
Shapley’s Spatial Component of the decomposition
- c_afloat
Shapley’s Attribute Component of the decomposition
Methods
__init__
(index1, index2[, …])Decompose segregation differences into spatial and attribute components.
plot
([plot_type, figsize, city_a, city_b, …])Plot maps or CDFs of urban contexts used in calculating the Decomposition class.
-