geosnap.data.Community.transition¶
-
Community.
transition
(self, cluster_col, time_var='year', id_var='geoid', w_type=None, permutations=0)[source]¶ (Spatial) Markov approach to transitional dynamics of neighborhoods.
The transitional dynamics approach should be adopted after neighborhood segmentation since the column name of neighborhood labels is a required input.
- Parameters
- cluster_colstring or int
Column name for the neighborhood segmentation, such as “ward”, “kmeans”, etc.
- time_varstring, optional
Column defining time and or sequencing of the long-form data. Default is “year”.
- id_varstring, optional
Column identifying the unique id of spatial units. Default is “geoid”.
- w_typestring, optional
Type of spatial weights type (“rook”, “queen”, “knn” or “kernel”) to be used for spatial structure. Default is None, if non-spatial Markov transition rates are desired.
- permutationsint, optional
number of permutations for use in randomization based inference (the default is 0).