plotPTI | R Documentation |
Function to plot particle tracks from OSCURS model runs on a map for the PAPA Trajectory Index.
plotPTI(
tracks,
trackID_col = "year",
emphasizeID = as.character(max(as.numeric(tracks[[trackID_col]]))),
addText = TRUE,
text_col = "year",
text_size = 1,
strCRS = tmaptools::get_proj4(4326, output = "character"),
basemap = wtsGIS::createBaseTMap(layer.land = wtsGIS::getPackagedLayer("Alaska"),
layer.bathym = wtsGIS::getPackagedLayer("ShelfBathymetry"), strCRS.finl = strCRS),
bounding_box = tmaptools::bb(xlim = c(-160, -130), ylim = c(46, 61), current.projection
= tmaptools::get_proj4("longlat", output = "character"), projection = strCRS),
gridLines = list(x = seq(from = -160, to = -130, by = 5), y = seq(from = 46, to = 60,
by = 2), projection = tmaptools::get_proj4("longlat", output = "character")),
style = NULL,
color_lines = "blue",
color_text = "blue",
alpha_lines = 1,
alpha_text = 1,
palette = NULL,
showMap = TRUE,
verbose = FALSE
)
tracks |
|
trackID_col |
|
emphasizeID |
|
addText |
|
text_col |
|
text_size |
|
strCRS |
|
basemap |
|
bounding_box |
|
gridLines |
|
style |
|
color_lines |
|
color_text |
|
alpha_lines |
|
alpha_text |
|
palette |
|
showMap |
|
verbose |
|
The returned list has the following elements:
map - a tmap object
tracks - a sf tibble with tracks that span the IDL to "roll your own" map
startLocs - a sf tibble with starting track locations as points to "roll your own" map
endLocs - a sf tibble with ending track locations as points to "roll your own" map
basemap - a basemap to "roll your own" map
The map object is in the coordinate reference system given by strCRS.
Requires packages dplyr
, magrittr
, sf
, tmap
, wtsGIS
.
a list (see details)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.