geosnap.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_col
str
orint
Column name for the neighborhood segmentation, such as “ward”, “kmeans”, etc.
- time_var
str
, optional Column defining time and or sequencing of the long-form data. Default is “year”.
- id_var
str
, optional Column identifying the unique id of spatial units. Default is “geoid”.
- w_type
str
, 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.
- permutations
int
, optional number of permutations for use in randomization based inference (the default is 0).
- cluster_col
- Returns
- mar
giddy.markov.Markov
orgiddy.markov.Spatial_Markov
if w_type=None, return a classic Markov instance; if w_type is given, return a Spatial_Markov instance
- mar