Description Usage Arguments Examples
Plot the graph network as a Shiny Leaflet app in a browser.
1 | plot_map(graph, shortest)
|
graph |
|
shortest |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
q <- osmdata::opq (bbox = c (11.58, 48.14, 11.585, 48.145))
q <- osmdata::add_feature (q, key = 'highway')
x <- osmdata::osmdata_sf(q)
net <- osmlines_as_network (x)
graph <- make_compact_graph (net)
start_pt <- graph$from_id [1]
end_pt <- graph$to_id [100]
prob <- get_probability (graph, start_pt, end_pt)
short <- get_shortest_path (graph, start_pt, end_pt)
plot_map (graph = prob, shortest = short)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.