# Plan the 'fastest' route between two points in Manchester
rf_mcr <- route_cyclestreet(from = "M3 4EE", to = "M1 4BT", plan = "fastest")
plot(rf_mcr)
# Plan the 'quietest' route from Hereford to Leeds
rqh <- route_cyclestreet(from = "Hereford", to = "Leeds", plan = "quietest")
plot(rq_hfd)
# Plan a 'balanced' route from Pedaller's Arms in Leeds
to the University of Leeds
rb_pa <- route_cyclestreet("Pedaller's Arms, Leeds", "University of Leeds", "balanced")
library(leaflet) # requires the leaflet CRAN package
# display the route on an interactive map
leaflet() %>% addTiles() %>%
addPolylines(data = rb_pa)
woodys_route = route_cyclestreet(from = "Stokesley", plan = "fastest", to = "Leeds")
# Plan a route between two lat/lon pairs in the UK
p1 <- c(-2, 52)
p2 <- p1 + 1 # add a degree!
route_cyclestreet(p1, p2, "fastest")
Run the code above in your browser using DataLab