momepy.
proportion
Calculates the proportion of intersection types for subgraph around each node if radius is set, or for whole graph, if radius=None.
radius=None
Subgraph is generated around each node within set radius. If distance=None, radius will define topological distance, otherwise it uses values in distance attribute.
distance=None
distance
Graph representing street network. Ideally generated from GeoDataFrame using momepy.gdf_to_nx()
momepy.gdf_to_nx()
Include all neighbors of distance <= radius from n
attribute name for 3-way intersections proportion
attribute name for 4-way intersections proportion
attribute name for deadends proportion
name of attribute of node degree (momepy.node_degree())
momepy.node_degree()
Use specified edge data key as distance. For example, setting distance=’weight’ will use the edge weight to measure the distance from the node n.
distance=’weight’
weight
if True, shows progress bars in loops and indication of steps
networkx.Graph if radius is set
dict with proportions for graph if radius=None
Examples
>>> network_graph = mm.proportion(network_graph, three='threeway', four='fourway', dead='deadends')