Skip to contents

GeoPressureViz is an interactive app to inspect and manually edit migration paths together with the underlying map likelihoods and pressure time series by stationary period. It is useful to compare pressure-, light- and distance-based information before finalizing a path.

The app can start from a tag object already in memory, or from an interim .RData/.rda file that contains at least tag (and optionally marginal, path_most_likely, pressurepath, pressurepath_most_likely).

GeoPressureViz is an exploration tool outside the geopressuretemplate() workflow. To keep an edited path, use the app's Export CSV button (read it back with read_stap()).

Learn more about GeoPressureViz in the GeoPressureManual .

Usage

geopressureviz(
  x,
  path = NULL,
  marginal = NULL,
  launch_browser = TRUE,
  run_bg = TRUE
)

Arguments

x

One of:

  • a GeoPressureR tag object;

  • a path to an existing .RData/.rda file;

  • a tag id (character scalar), interpreted as "./data/interim/{id}.RData".

path

Optional GeoPressureR path or pressurepath data.frame. If NULL, a path is resolved from available inputs in this order:

  • for file/id input (x character): the first present of pressurepath, pressurepath_most_likely and path_most_likely;

  • otherwise fallback to tag2path(tag, interp = 1).

marginal

map of the marginal probability computed with graph_marginal(). Overwrites the marginal contained in the .RData file.

launch_browser

If TRUE (default), the app opens in your web browser; otherwise, only the app URL is printed.

run_bg

If TRUE (default), the app runs in a background R session using the callr package. This allows you to continue using your R session while the app is running.

Value

When run_bg = TRUE, the background process object, invisibly. Otherwise NULL, invisibly, when the app closes.

Basemap API keys

Interactive maps always offer Esri basemaps (gray canvas, imagery and topographic). CARTO, Mapbox and MapTiler basemaps are added to the layer control only when their API key is stored in your system keyring. Get a key from each provider:

Then store each key once:

keyring::key_set_with_value("CARTO_API_KEY", password = "<your CARTO API key>")
keyring::key_set_with_value("MAPBOX_ACCESS_TOKEN", password = "<your Mapbox token>")
keyring::key_set_with_value("MAPTILER_API_KEY", password = "<your MapTiler API key>")

Mapbox access tokens are visible in the browser when a map is rendered. Use a public, read-only token rather than a secret token.

Examples

if (FALSE) {
  geopressureviz("18LX")
}