| Title: | Efficient Identification of Neighbourhoods within Networks |
|---|---|
| Description: | Algorithm for efficient identification of neighbourhoods within networks. |
| Authors: | Mark Padgham [aut, cre] |
| Maintainer: | Mark Padgham <[email protected]> |
| License: | GPL-3 |
| Version: | 0.0.1.236 |
| Built: | 2026-06-05 20:07:56 UTC |
| Source: | https://github.com/atfutures-labs/neighbourhoods |
Construct adjacency matrix of neighbourhood cycles
adjacent_cycles(cycles)adjacent_cycles(cycles)
cycles |
List of cycles obtained from network_cycles. |
A 'data.frame' of three columns:
from - cycle from which connection is made
to - cycle to which connection is made
edges - List-column of all shared edges between (from, to) pair.
Use result of neighbourhoods function to make and score an LTN
cut_nbs(nbs, i, dmax = 10000)cut_nbs(nbs, i, dmax = 10000)
nbs |
Results of neighbourhoods function. |
i |
Index of which neighbour pair is to be cut. |
dmax |
Maximal distance in metres around neighbourhood to use to generate centrality scores. |
A sample street network from the primarily pedestrian township of Hampi, Karnataka, India.
A silicate representation of the way network of Hampi.
Score an LTN formed by blocking one street segment between two adjacent neighbourhoods.
ltn_score(nbs, index, dmax = 10000)ltn_score(nbs, index, dmax = 10000)
nbs |
Output of main neighbourhoods function. |
index |
Index into rows of 'nbs$nbs' specifying which pairs of adjacent neighbourhoods are to be scored. |
dmax |
Maximal distance in metres around neighbourhood to use to generate scores. |
Modified version of 'nbs$nbs' from input parameter, reduced to only those neighbour pairs specified in 'index', and with additional column, 'pop_decr_in' and 'pop_incr_out' specifying absolute decreases within and increases surrounding proposed LTN.
Train a prediction model to score LTNs from a sample of size, 'n'.
ltn_train(nbs, n = 100, dmax = 10000)ltn_train(nbs, n = 100, dmax = 10000)
nbs |
Output of main neighbourhoods function. |
n |
Size of sample to use in training and predicting data sets. |
dmax |
Maximal distance in metres around neighbourhood to use to generate scores. |
A trained model which can be used to predict additional LTN scores.
Find candidate low-traffic-neighbourhoods in an input street network.
neighbourhoods(network, popdens)neighbourhoods(network, popdens)
network |
Street network in silicate 'sc' format, extracted with dodgr function, 'dodgr_streetnet_sc'. |
popdens |
Path to local population density file covering region of street network, and in 'geotiff' format. |
A 'data.frame' of candidate low-traffic neighbourhoods.
Get the minimal cycles of an undirected version of a dodgr street network in contracted and undirected form.
network_cycles(x)network_cycles(x)
x |
An dodgr street network processed with the 'dodgr_contract_graph' and 'merge_directed_graph' functions. |
A list of the minimal cycles of the street network, each of which has three columns of ('.vx0', '.vx1', '.edge_').
Convert cycles created on contracted graph back to equivalent uncontracted cycles.
uncontract_cycles(paths, graph, graph_c)uncontract_cycles(paths, graph, graph_c)
paths |
List of cycle paths as a result of network_cycles. |
graph |
Full, non-contracted graph. |
graph_c |
Contracted graph resulting from call to 'dodgr_contract_graph'. |
Equivalent list of 'paths', with each path expanded out to full edges in original, non-contracted graph.