mapApp | R Documentation |
mapApp()
sets up an interactive "shiny app" session for exploring
the spatial-temporal distribution of Argo profiles. The graphical
user interface (GUI) is meant to be reasonably self-explanatory,
and a button labelled Help yields a pop-up window with
more information that might not be evident at first glance.
A number of keystrokes exist to assist the user including:
u: undo previous actions
i: zoom in
o: zoom out
n: go north
e: go east
s: go south
w: go west
f: go forward in time
b: go backward in time
r: reset to initial state
h: hold active hover message (press h again to undo)
0: unzoom an area
d: toggle debugging flag
More details are provided in the rest of this documentation
page, and in Section 4 of Kelley et al. (2021).
mapApp(
age = argoDefaultIndexAge(),
server = argoDefaultServer(),
destdir = argoDefaultDestdir(),
colLand = "lightgray",
debug = 0
)
age |
numeric value indicating how old a downloaded file
must be (in days), for it to be considered out-of-date. The
default, |
server |
character value, or vector of character values, indicating the name of
servers that supply argo data to be acquired with |
destdir |
character value indicating the directory in which to store
downloaded files. The default value is to compute this using
|
colLand |
a colour specification for the land. |
debug |
integer value that controls how much information |
mapApp()
uses getIndex()
to download index files from an Argo server
the first time it runs. This can be slow, taking a minute or more, depending
on the internet connection and load on the server. Once the index
files are downloaded, mapApp()
categorizes profiles as Core,
BGC, or Deep (which may be displayed in any combination, using
GUI elements).
The hi-res
button will only affect the coastline, not the topography,
unless there is a local file named topoWorldFine.rda
that contains
an alternative topographic information. Here is how to create such a file:
library(oce) topoFile <- download.topo(west=-180, east=180, south=-90, north=90, resolution=10, format="netcdf", destdir=".") topoWorldFine <- read.topo(topoFile) save(topoWorldFine, file="topoWorldFine.rda") unlink(topoFile) # clean up
mapApp
has no return value, since it creates a shiny app by passing
control to shiny::runApp()
, which never returns.
Dan Kelley and Jaimie Harbin
Kelley, D. E., Harbin, J., & Richards, C. (2021). argoFloats: An R package for analyzing Argo data. Frontiers in Marine Science, (8), 636922. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3389/fmars.2021.635922")}
if (interactive()) {
library(argoFloats)
mapApp()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.