momepy.
NodeDensity
Calculate the density of nodes neighbours on street network defined in spatial_weights.
spatial_weights
Calculated as number of neighbouring nodes / cummulative length of street network within neighbours. node_start and node_end is standard output of momepy.nx_to_gdf() and is compulsory.
momepy.nx_to_gdf()
Adapted from [DPR+17].
GeoDataFrame containing nodes of street network
GeoDataFrame containing edges of street network
spatial weights matrix capturing relationship between nodes
if True density will take into account node degree as k-1
k-1
name of the column of left gdf containing node degree. Used if weighted=True
weighted=True
name of the column of right gdf containing id of starting node
name of the column of right gdf containing id of ending node
if True, shows progress bars in loops and indication of steps
Examples
>>> nodes['density'] = mm.NodeDensity(nodes, edges, sw).series
Series containing resulting values
original left GeoDataFrame
original right GeoDataFrame
Series containing used ids of starting node
Series containing used ids of ending node
spatial weights matrix
used weighted value
Series containing used node degree values
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(left, right, spatial_weights[, …])
Initialize self.