geosnap.visualize.plot_transition_graphs¶
- geosnap.visualize.plot_transition_graphs(gdf, cluster_col=None, output_dir='.', w_type='queen', w_options=None, temporal_index='year', unit_index='geoid', permutations=0, layout='dot', args='-n -Groot=0 -Goverlap=false -Gnodesep=0.01 -Gfont_size=1 -Gmindist=3.5 -Gsize=30,30!', transition_model=None)[source]¶
Plot a network graph representation of global and spatially-conditioned transition matrices.
This function requires pygraphviz to be installed. For linux and macos, it can be installed with conda install -c conda-forge pygraphviz. At the time of this writing there is no pygraphviz build available for Windows from mainstream conda channels, but it can be installed with conda install -c alubbock pygraphviz
- Parameters:
- gdf
geopandas.GeoDataFrame
long-form geodataframe with a column holding labels appropriate for using as input to geosnap.analyze.transition
- cluster_col
str
column on the gdf containing neighborhood type labels
- output_dir
str
the location that output images will be placed
- temporal_index
str
, optional Column defining time and or sequencing of the long-form data. Default is “year”.
- unit_index
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.
- w_options
dict
additional options passed to a libpysal weights constructor (e.g. k for a KNN weights matrix)
- permutations
int
, optional number of permutations for use in randomization based inference (the default is 0).
- layout
str
, ‘dot’ graphviz layout for plotting
- args
str
, optional additional arguments passed to graphviz. default is “-n -Groot=0 -Goverlap=false -Gnodesep=0.01 -Gfont_size=1 -Gmindist=3.5 -Gsize=30,30!”
- Returns
- ——
- None
- gdf