map_isochrone: Generate maps of isochrones

Description Usage Arguments Value Examples

View source: R/valhalla.R

Description

This is a convenience function that takes the output of valhallr::isochrone() and generates either a static or interactive map.

Usage

1
map_isochrone(isochrone, method = "leaflet")

Arguments

isochrone

An isochrone sf object generated by valhallr::isochrone().

method

The method used to map it. Two methods are supported:

  • "leaflet" produces an interactive HTML map using the Leaflet package.

  • "ggplot" produces a static map.

Value

A plot of the isochrones, either a a leaflet object or a ggplot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(valhallr)
# set up our departure point: the University of Ottawa
from <- test_data("uottawa")

# generate a set of isochrones for travel by bicycle
i <- valhallr::isochrone(from, costing = "bicycle")

# map the isochrones
map_isochrone(i)

## End(Not run)

valhallr documentation built on March 9, 2021, 9:09 a.m.