Create a standalone map
driveplot_map.RdCreate a standalone map
Usage
driveplot_map(
shareddata,
lng = NULL,
lat = NULL,
colorvar = NULL,
label = NA,
colorpalette = "#03F",
fillOpacity = 1,
mapheight = "98vh"
)Arguments
A SharedData object containing observations to be plotted.
- lng
The bare (unquoted) column of shareddata containing longitude (only required if shareddata does not have a geometry column).
- lat
The bare (unquoted) column of shareddata containing latitude (only required if shareddata does not have a geometry column).
- colorvar
The bare (unquoted) column in shareddata to which color should be mapped.
- label
An optional label for the map points.
- colorpalette
The color palette for the map; either a single color (e.g., "red") or one of "viridis", "inferno", "magma", or "plasma".
- fillOpacity
The opacity of the fill of the map points (0 to 1).
- mapheight
The height of the map in CSS units, e.g, "98vh".
Examples
library(crosstalk)
data(drive7)
shared_drive <- SharedData$new(drive7)
# Basic map of one drive
driveplot_map(shareddata = shared_drive)
# Color drive points by direction of car
driveplot_map(shareddata = shared_drive,
colorvar = gyro_heading,
label = gyro_heading,
colorpalette = "viridis")