createNeighbourNetwork | R Documentation |
create a neighbourhood network from touching regions in a shapefile, with additional capability to connect non touching areas where there may be bridges etc.
createNeighbourNetwork(
shape,
idVar = "code",
bridges = arear::ukconnections,
queen = FALSE,
...
)
shape |
- a sf object, if not present will be loaded from cache |
idVar |
- the column containing the coded identifier of the map |
bridges |
- a df with the following columns: name start.lat start.long end.lat end.long defining connections between non touching shapes (e.g. bridges / ferries / etc.) |
queen |
- include neighbouring areas that only touch at corners, defaults to false. |
... |
- passed on to .cached() (cache control) - relevant is nocache = TRUE which prevents this from being precalculated |
an edge list of ids with from and to columns
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.