map: ggmap of a track

Description Usage Arguments Value Examples

Description

This is a wrapper around the ggmap function that plots a movetrack object (including with multiple individuals).

Usage

1
map(movetrack, ...)

Arguments

movetrack

a movetrack class object, or any data-frame that contains (at least) three columns labeled "time", "x" and "y"

...

additional parameters to pass to ggmap

id

a vector of individuals to map (default = NULL - plots all individuals)

individually

whether to produce plots individually (TRUE) or as a population (FALSE; default).

projection

one of the options from mapproject. Default - "albers", which seems to be best for (must be character string).

print

whether or not to print map. Default TRUE

exportPDF

a logical indicating whether or not to export plots as a PDF (default = FALSE).

zoom

the zoom level - an integer from 3 (continent) to 21 (building) - or (by default) automatically selected as one level lower than the output of calc_zoom.

luminance

the default colors are richer than the pale ggplot palette which is often hard to see on maps.

Value

if print = FALSE, will return the ggmap object, otherwise, returns nothing. If exportPDF = TRUE outputs a single PDF of all individuals or a population to the working directory.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
### Enter Login and Password information for Movebank

## Not run: 
# login <- movebankLogin(username="xxxx", password="xxxx")

# Pull data from movebank
ge1 <- getMovebankData(study="ABoVE: HawkWatch International Golden Eagles", login=login)     #multiple birds

# Estimate daily mean locations
ge1.dailymean <- processMovedata(ge1,  id = "individual_id", dailymean = TRUE)

# Three convenient "movetrack" methods:
summary(ge1.dailymean)
plot(ge1.dailymean)
map(ge1.dailymean)


# one bird, three deployments
ge2 <- getMovebankData(study="Aquila chrysaetos interior west N. America, Craigs, Fuller", animalName="629-26704", login=login) 

# all locations and all columns
ge2.dailymean <- processMovedata(ge2,  id = "individual_id", keepCols = "all")
summary(ge2.dailymean)
plot(ge2.dailymean, id = ge2.dailymean$id[1])
map(ge2.dailymean)

ABoVE-AotM/above documentation built on May 28, 2020, 6:08 a.m.