mapApp: Interactive App For Viewing Argo Float Positions

Description Usage Arguments Details Value Author(s) References Examples

View source: R/mapApp.R

Description

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. More details are provided in the rest of this documentation page, and in Section 4 of Kelley et al. (2021).

Usage

1
2
3
4
5
6
7
mapApp(
  age = argoDefaultIndexAge(),
  server = argoDefaultServer(),
  destdir = argoDefaultDestdir(),
  colLand = "lightgray",
  debug = 0
)

Arguments

age

numeric value indicating how old a downloaded file must be (in days), for it to be considered out-of-date. The default, argoDefaultIndexAge(), limits downloads to once per day, as a way to avoid slowing down a workflow with a download that might take a minute or so. Note that setting age=0 will force a new download, regardless of the age of the local file.

server

character value, or vector of character values, indicating the name of servers that supply argo data to be acquired with getIndex(). If not supplied, the default will be determined with argoDefaultServer(), which uses a value set by options("argoFloats.server"=URL) where URL is an appropriate URL, or "ifremer-https" if no such option was set.

destdir

character value indicating the directory in which to store downloaded files. The default value is to compute this using argoDefaultDestdir(), which returns ~/data/argo by default, although it also provides ways to set other values using options(). Set destdir=NULL if destfile is a filename with full path information. File clutter is reduced by creating a top-level directory called data, with subdirectories for various file types; see “Examples”.

colLand

a colour specification for the land.

debug

integer value that controls how much information mapApp() prints to the console as it works. The default value of 0 leads to a fairly limited amount of printing, while higher values lead to more information. This information can be helpful in diagnosing problems or bottlenecks.

Details

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

Value

mapApp has no return value, since it creates a shiny app by passing control to shiny::runApp(), which never returns.

Author(s)

Dan Kelley and Jaimie Harbin

References

Kelley, D. E., Harbin, J., & Richards, C. (2021). argoFloats: An R package for analyzing Argo data. Frontiers in Marine Science, (8), 636922. doi: 10.3389/fmars.2021.635922

Examples

1
2
3
4
if (interactive()) {
    library(argoFloats)
    mapApp()
}

dankelley/argoFloats documentation built on Oct. 19, 2021, 1:17 p.m.