Plot location data on a map
Function to plot tracking data on a map or a satellite image.
map_track( sdata, xlim = NULL, ylim = NULL, margin = 10, bgmap = NULL, google.key = NULL, map.bg = "grey", map.col = "black", zoom = NULL, point.bg = "yellow", point.col = "black", point.symbol = 21, point.size = 1, line.col = "lightgrey", line.type = 1, line.size = 0.5, sb.distance = NULL, sb.lwd = 1, sb.line.col = "black", sb.text.size = 4, sb.text.col = "black", sb.space = 3, title = "id", title.size = 11, axes.text.size = 11, axes.lab.size = 11, multiplot = TRUE, nrow = 1, ncol = 1 )
sdata |
A data frame containing columns with the following headers: "id", "DateTime", "lat", "lon".
The function creates a map for each unique "id" (e.g. transmitter number, identifier for each animal).
"DateTime" is the GMT date & time of each location in class |
xlim, ylim |
Limits for x and y axes. If not specified, the values are determined as the maximum range of the input data plus an additional margin (see margin). |
margin |
Set the amount of spaces added around the periphery of the plot. The value is scaled to the plot. The smaller value increases the margin. |
bgmap |
A data frame of a background map data, containing the following headers: "long", "lat", "group".
If not specified, the |
google.key |
If Google Maps are queried, a valid API key (a string) needs to be specified here. See |
map.bg |
Background colour of the map. This argument is ignored when any Google Maps is selected. |
map.col |
Outline colour of the map. This argument is ignored when any Google Maps is selected. |
zoom |
Map zoom for Google Maps. Default (NULL) to estimate the zoom from each data set.
For other options, see |
point.bg |
The colour to fill in a symbol. |
point.col |
The colour for the outline of a symbol. |
point.symbol |
An integer or a string to specify the symbol type. See |
point.size |
An integer to specify the size of the symbol. |
line.col |
The colour of the line that connects consecutive points. |
line.type |
The type of the line that connects consecutive points. See |
line.size |
An integer to specify the thickness (width) of the line that connects consecutive points. |
sb.distance |
An integer to specify the length of the scale bar. If not specified, approximately a quarter of the plotting range will be used. |
sb.lwd |
An integer to specify the thickness (width) of the scale bar. |
sb.line.col |
The colour of the scale bar. |
sb.text.size |
An integer to specify the text size for the scale bar. |
sb.text.col |
The colour of the text for the scale bar. |
sb.space |
Set the amount of space between the scale bar and the text. The value is scaled to the plot. The smaller value increases the space. |
title |
The main title for each plot. If not specified, the "id" will be used. |
title.size |
An integer to specify the size of the title. |
axes.text.size |
An integer to specify the size of the axes characters. |
axes.lab.size |
An integer to specify the size of the axes labels. |
multiplot |
Logical. If TRUE (default), multiple plots are displayed on the same page. |
nrow |
An integer to specify the number of rows in the multiple plot page. |
ncol |
An integer to specify the number of columns in the multiple plot page. |
An arrangelist is returned when multiplot is TRUE. Otherwise a list is returned.
Takahiro Shimada
#### Load data sets ## Fastloc GPS data obtained from two green turtles data(turtle) data(turtle2) turtles<-rbind(turtle, turtle2) #### Filter temporal and/or spatial duplicates turtle.dup <- dupfilter(turtles, step.time=5/60, step.dist=0.001) #### ddfilter V <- vmax(turtle.dup) VLP <- vmaxlp(turtle.dup) turtle.dd <- ddfilter(turtle.dup, vmax=V, vmaxlp=VLP) #### Plot filtered data for each animal ## using the low-resolution world map map_track(turtle.dd, point.size = 2, line.size = 0.5, axes.lab.size = 0, ncol=2, nrow=1) ## Not run: ## using the high-resolution google satellite images map_track(turtle.dd, bgmap = "satellite", google.key = "key", ncol=2) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.