Network.distancebandweights(self, threshold, n_proccess=None, gen_tree=False)[source]¶Create distance based weights.
Distance threshold value.
(Optional) Specify the number of cores to utilize. Default
is 1 core. Use int to specify an exact number or cores.
Use "all" to request all available cores.
Rebuild shortest path with True, or skip with False.
A pysal W Object representing the binary adjacency of
the network.
Examples
>>> import spaghetti as spgh
>>> streets_file = examples.get_path('streets.shp')
>>> ntw = spgh.Network(in_data=streets_file)
>>> w = ntw.distancebandweights(threshold=500)
>>> w.n
230
>>> w.histogram[-1]
(8, 3)