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_colstr or int

Column name for the neighborhood segmentation, such as “ward”, “kmeans”, etc.

time_varstr, optional

Column defining time and or sequencing of the long-form data. Default is “year”.

id_varstr, optional

Column identifying the unique id of spatial units. Default is “geoid”.

w_typestr, 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).

Returns
margiddy.markov.Markov or giddy.markov.Spatial_Markov

if w_type=None, return a classic Markov instance; if w_type is given, return a Spatial_Markov instance