momepy.
NodeDensity
(left, right, spatial_weights, weighted=False, node_degree=None, node_start='node_start', node_end='node_end')[source]¶Calculate the density of nodes neighbours on street network defined in spatial_weights.
Calculated as number of neighbouring nodes / cummulative length of street network withinn eighbours.
node_start and node_end is standard output of momepy.nx_to_gdf()
and is compulsory.
GeoDataFrame containing nodes of street network
GeoDataFrame containing edges of street network
spatial weights matrix capturing relationship between nodes within set topological distance
if True density will take into account node degree as k-1
name of the column of left gdf containing node degree. Used if 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
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__
(self, left, right, spatial_weights, weighted=False, node_degree=None, node_start='node_start', node_end='node_end')[source]¶Initialize self. See help(type(self)) for accurate signature.
Methods
|
Initialize self. |