GeoLightViz is an interactive tool for reviewing twilight observations and
preparing light-based geolocation analyses. It displays the light record and
detected twilight events so that observations affected by shading or other
light obstructions can be marked as discarded. It can also be used to define
or edit stationary periods from twilight patterns, which is useful when
pressure or acceleration data are unavailable. When a map has been defined
with tag_set_map() and stationary periods are available, the app links the
light plot to a map of twilight likelihoods. You can explore candidate
locations and tune twilight calibration and likelihood aggregation settings
with visual feedback. Twilight labels and stationary periods can be saved or
exported from the app.
Arguments
- x
a GeoPressureR
tagobject, a.Rdatafile or the unique identifieridwith a.Rdatafile located in"./data/interim/{id}.RData".- stapath
optional stationary path data.frame (defaults to
tag$stapwhen available).- launch_browser
If true (by default), the app runs in your browser, otherwise it runs on Rstudio.
- run_bg
If true (by default), the app runs in a background R process using
callr::r_bg(), allowing you to continue using the R console. If false, the app blocks the console until closed.- quiet
logical, currently unused.
- ...
currently unused.
Value
When run_bg = TRUE, an invisible callr r_process running the app.
When run_bg = FALSE, the return value of shiny::runApp().
Details
See the GeoLightViz chapter of the GeoPressureManual for an overview of the app's controls and workflow.
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:
CARTO: "Get your API key" on CARTO Basemaps.
Mapbox: Access tokens page of your account (see Mapbox documentation).
MapTiler: API keys page of your MapTiler Cloud account (see MapTiler documentation).
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) {
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- tag_create("18LX", quiet = TRUE) |>
tag_label(quiet = TRUE) |>
twilight_create() |>
twilight_label_read()
})
geolightviz(tag, run_bg = FALSE, launch_browser = FALSE)
}
