
Map Coral Populations with Species Coloring
map_populations.RdPlots a spatial map of coral populations over a setplot base layer using tmap.
Species are color-coded with a customizable palette, and output can be either
interactive (web) or static. Optionally enables or disables WebGL for 3D rendering
in interactive view.
Usage
map_populations(
setplot,
populations,
interactive = TRUE,
zoom = c(22, 32),
webgl = TRUE
)Arguments
- setplot
An
sforSpatVectorobject representing the background plot layer (e.g. reef tiles).- populations
An
sfobject with point geometries and aspeciescolumn to map.- interactive
Logical; if
TRUE, the map is shown in an interactive web view. IfFALSE, it renders as a static plot.- webgl
Logical; if
interactive = TRUE, sets WebGL rendering mode intm_view().
Examples
if (FALSE) { # \dontrun{
grid <- setplot(10, 5)
map_populations(setplot = grid, populations = coral_points, interactive = TRUE, webgl = FALSE)
} # }