plotSat {moveHMM}R Documentation

Plot observations on satellite image

Description

Plot tracking data on a satellite map. This function only works with longitude and latitude values (not with UTM coordinates), and uses the package ggmap to fetch a satellite image from Google. An Internet connection is required to use this function.

Usage

plotSat(
  data,
  zoom = NULL,
  location = NULL,
  segments = TRUE,
  compact = TRUE,
  col = NULL,
  alpha = 1,
  size = 1,
  states = NULL,
  animals = NULL,
  ask = TRUE,
  return = FALSE
)

Arguments

data

Data frame of the data, with necessary fields 'x' (longitude values) and 'y' (latitude values).

zoom

The zoom level, as defined for get_map. Integer value between 3 (continent) and 21 (building).

location

Location of the center of the map to be plotted.

segments

TRUE if segments should be plotted between the observations (default), FALSE otherwise.

compact

FALSE if tracks should be plotted separately, TRUE otherwise (default).

col

Palette of colours to use for the dots and segments. If not specified, uses default palette.

alpha

Transparency argument for geom_point.

size

Size argument for geom_point.

states

A sequence of integers, corresponding to the decoded states for these data (such that the observations are colored by states).

animals

Vector of indices or IDs of animals/tracks to be plotted. Default: NULL; all animals are plotted.

ask

If TRUE, the execution pauses between each plot.

return

If TRUE, the function returns a ggplot object (which can be edited and plotted manually). If FALSE, the function automatically plots the map (default).

Details

If the plot displays the message "Sorry, we have no imagery here", try a lower level of zoom.

References

D. Kahle and H. Wickham. ggmap: Spatial Visualization with ggplot2. The R Journal, 5(1), 144-161. URL: http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf


[Package moveHMM version 1.9 Index]