plot_route: Plot routes for training sessions

View source: R/trackeRdata_plot.R

plot_routeR Documentation

Plot routes for training sessions

Description

Plot the route ran/cycled during training onto a background map. Internet connection is required to download the background map.

Usage

plot_route(
  x,
  session = 1,
  zoom = NULL,
  speed = TRUE,
  threshold = TRUE,
  mfrow = NULL,
  maptype = "stamen_terrain",
  messaging = FALSE,
  ...
)

plotRoute(
  x,
  session = 1,
  zoom = NULL,
  speed = TRUE,
  threshold = TRUE,
  mfrow = NULL,
  maptype = "stamen_terrain",
  messaging = FALSE,
  ...
)

Arguments

x

A object of class trackeRdata.

session

A numeric vector of the sessions to be plotted. Defaults to the first session, all sessions can be plotted by session = NULL.

zoom

The zoom level for the background map as passed on to get_stadiamap (2 corresponds roughly to continent level and 20 to building level).

speed

Logical. Should the trace be coloured according to speed?

threshold

Logical. Should thresholds be applied?

mfrow

A vector of 2 elements, number of rows and number of columns, specifying the layout for multiple sessions.

maptype

Passed to get_stadiamap. Default is "stamen_terrain".

messaging

Passed to get_stadiamap. Default is FALSE.

...

Additional arguments passed on to threshold and get_stadiamap.

Details

plot_route() requires a a Stadia Maps API key. See register_stadiamaps for details.

See Also

get_stadiamap, ggmap

Examples

## Not run: 
data('runs', package = 'trackeR')
plot_route(runs, session = 4, zoom = 13)
plot_route(runs, session = 4, zoom = 13, maptype = "outdoors")
## multiple sessions
plot_route(runs, session = c(1:4, 8:11))
## different zoom level per panel
plot_route(runs, session = 6:7, zoom = c(13, 14))

## End(Not run)

trackeR documentation built on May 29, 2024, 5:04 a.m.