momepy.
Reached
Calculates the number of objects reached within neighbours on street network
Number of elements within neighbourhood defined in spatial_weights. If spatial_weights are None, it will assume topological distance 0 (element itself). If mode='area', returns sum of areas of reached elements. Requires unique_id of network assigned beforehand (e.g. using momepy.get_network_id()).
spatial_weights
None
0
mode='area'
momepy.get_network_id()
GeoDataFrame containing streets (either segments or nodes)
GeoDataFrame containing elements to be counted
the name of the left dataframe column, np.array, or pd.Series where is stored ID of streets (segments or nodes).
np.array
pd.Series
the name of the right dataframe column, np.array, or pd.Series where is stored ID of streets (segments or nodes).
spatial weights matrix
mode of calculation. If 'count' function will return the count of reached elements. If 'sum', it will return sum of 'values'. If 'mean' it will return mean value of 'values'. If 'std' it will return standard deviation of 'values'. If 'values' not set it will use of areas of reached elements.
'count'
'sum'
'values'
'mean'
'std'
the name of the objects dataframe column with values used for calculations
if True, shows progress bars in loops and indication of steps
Examples
>>> streets_df['reached_buildings'] = mm.Reached(streets_df, buildings_df, 'uID').series
Series containing resulting values
original left GeoDataFrame
original right GeoDataFrame
Series containing used left ID
Series containing used right ID
mode of calculation
spatial weights matrix (if set)
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(left, right, left_id, right_id[, …])
Initialize self.