This function visualizes deployments features such as number of detected species, number of observations and RAI on a dynamic map. The circle size and color are proportional to the mapped feature. Deployments without observations are shown as gray circles and a message is returned.
map_dep(
package = NULL,
feature,
...,
species = NULL,
sex = NULL,
life_stage = NULL,
effort_unit = NULL,
cluster = TRUE,
hover_columns = c("n", "species", "deploymentID", "locationID", "locationName",
"latitude", "longitude", "start", "end"),
palette = "inferno",
zero_values_show = TRUE,
zero_values_icon_url = "https://img.icons8.com/ios-glyphs/30/000000/multiply.png",
zero_values_icon_size = 10,
relative_scale = TRUE,
max_scale = NULL,
radius_range = c(10, 50),
datapkg = lifecycle::deprecated()
)
Camera trap data package object, as returned by
read_camtrap_dp()
.
Deployment feature to visualize. One of:
"n_species"
: number of identified species
"n_obs"
: number of observations
"n_individuals"
: number of individuals
"rai"
: Relative Abundance Index
"effort"
: effort (duration) of the deployment
Filter predicates for subsetting deployments.
Character with a scientific name. Required for rai
,
optional for n_obs
. Default: NULL
.
Character defining the sex class to filter on, e.g. "female"
.
If NULL
, default, all observations of all sex classes are taken into
account. Optional argument for n_obs
and n_individuals
.
Character vector defining the life stage class to filter on, e.g.
"adult"
or c("subadult", "adult")
. If NULL
, default, all observations
of all life stage classes are taken into account. Optional argument for n_obs
and n_individuals
.
Time unit to use while visualizing deployment effort (duration). One of:
second
minute
hour
day
month
year
Logical value indicating whether using the cluster option while visualizing maps. Default: TRUE.
Character vector with the name of the columns to use for
showing location deployment information while hovering the mouse over. One
or more from deployment columns. Use NULL
to disable hovering. Default
information:
n
: number of species, number of observations, RAI or effort (column
created internally by a get_*()
function)
species
: species name(s)
start
: start deployment
end
: end deployment -
deploymentID
deployment unique identifier
locationID
location unique identifier
locationName
location name
latitude
longitude
See section Deployment of Camtrap DP standard for the full list of columns you can use.
The palette name or the color function that values will be mapped to. Typically one of the following:
A character vector of RGB or named colors. Examples: c("#000000", "#0000FF", "#FFFFFF"))
,topo.colors(10))
.
the full name of a RColorBrewer palette, e.g. "BuPu" or "Greens", or
viridis palette: "viridis"
, "magma"
, "inferno"
or "plasma"
For more options, see argument palette
of leaflet::colorNumeric()
.
Logical indicating whether to show deployments with
zero values. Default: TRUE
.
character with URL to icon for showing
deployments with zero values. Default: a cross (multiply symbol)
"https://img.icons8.com/ios-glyphs/30/000000/multiply.png"
.
a number to set the size of the icon to show deployments with wero values. Default: 10.
Logical indicating whether to use a relative color
and radius scale (TRUE
) or an absolute scale (FALSE
). If absolute scale
is used, specify a valid max_scale
.
Number indicating the max value used to map color and radius.
Vector of length 2 containing the lower and upper limit
of the circle radius. The lower value is used for deployments with zero
feature value, i.e. no observations, no identified species, zero RAI or
zero effort. The upper value is used for the deployment(s) with the highest
feature value (relative_scale
= TRUE
) or max_scale
(relative_scale
= FALSE
). Default: c(10, 50)
.
Deprecated. Use package
instead.
Leaflet map.
Check documentation about filter predicates: pred()
, pred_in()
,
pred_and()
, ...