| ox_add_edge_speeds | R Documentation |
Assigns a free-flow speed (km/h) to every edge based on its highway class,
adding a speed_kph column. Unknown classes get fallback.
ox_add_edge_speeds(g, speeds = NULL, fallback = 40)
g |
An osm_graph. |
speeds |
Optional named numeric vector of |
fallback |
Speed (km/h) for edges with no matching class. Default |
The osm_graph with a speed_kph edge column.
g <- example_osm_graph()
g <- ox_add_edge_speeds(g, speeds = c(residential = 25))
head(g$edges$speed_kph)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.