[Maturing]

map_dist_odkc(
  dist,
  tracks = NULL,
  sites = NULL,
  wastd_url = wastdr::get_wastd_url(),
  fmt = "%d/%m/%Y %H:%M",
  tz = "Australia/Perth",
  cluster = FALSE
)

Arguments

dist

The output of parse_disturbance_observations().

tracks

The output of turtleviewer::turtledata$tracks_dist - Turtle nest disturbance obs joined to turtle nests.

sites

An sf object of sites with site_name and polygon geom, e.g. turtleviewer::turtledata$sites.

wastd_url

The base URL for WAStD, default: get_wastd_url()

fmt

The desired date format, default: "d/m/Y H:M"

tz

The lubridate timezone, default: "Australia/Perth

cluster

If TRUE, cluster map markers. Default: FALSE. Note: In some places, the aerial background layer does not provide imagery at sufficient zoom levels, and therefore restricts the map zoom at levels where the cluster markers don't expand. Switch to "Place names" to let cluster markers expand.

Value

A leaflet map

Details

Creates a Leaflet map with an interactive legend offering to toggle each disturbance class separately. The maps auto-zooms to the extent of data given.

Examples

if (FALSE) {
data("odkc_data")
map_dist_odkc(
  odkc_data$dist,
  tracks = odkc_data$tracks_dist, sites = odkc_data$sites
)
map_dist_odkc(NULL, tracks = odkc_data$tracks_dist, sites = odkc_data$sites)
map_dist_odkc(odkc_data$dist, tracks = NULL, sites = odkc_data$sites)
map_dist_odkc(odkc_data$dist, tracks = odkc_data$tracks_dist, sites = NULL)
}