momepy.stroke_access#

momepy.stroke_access(stroke_graph)[source]#

Computes the stroke’s access. Access is defined as the difference between the degree and the connectivity of a stroke. See compute_stroke_connectivity() for a definition of connectivity.

Adapted from [El Gouj et al., 2022].

Parameters:
stroke_graph: nx.Graph()

Stroke graph of a network, generated with momepy.coins_to_nx().

Returns:
stroke_graph: nx.Graph()

Returns stroke_graph where each node has acquired the additional attribute stroke_access; and the additional attribute(s) stroke_connectivity and stroke_degree (unless they have been present in the input graph).

Examples

>>> stroke_graph = stroke_access(stroke_graph)