The function maps a dataset of SLF occurrences and a polygon delineating their invaded range.

map_alphahull(
  data = lyde,
  bio_year = max(data$bio_year, na.rm = TRUE),
  alpha = 19746.64,
  use_public = FALSE,
  only_established = TRUE,
  buffer_width = 10,
  zoom = "range",
  xlim_coord = NULL,
  ylim_coord = NULL,
  print_message = TRUE
)

Arguments

data

The lydemapr data file.

bio_year

Limits the data observations to those occurring on or before the biological year specified. Unless explicitly supplied, it defaults to the latest available year.

alpha

The coarseness of the hull drawing. The default is based on the cross validation work.

use_public

A logical specifying whether public reports should be included (FALSE by default).

only_established

A logical specifying whether only points with established SLF should be included (TRUE by default).

buffer_width

A necessary parameter for the construction of a shape from the hull (10 m recommended, so that is the default).

zoom

Defines the limits of the map to be plotted. `"range"` limits the map to the established range for SLF; `"full"` displays the whole United States. `"custom"` the user to specify the range over which the map should be displayed (see `xlim_coord, ylim_coord` below).

xlim_coord, ylim_coord

Ordered numerical vectors of length 2 determining the longitudinal (`xlim`) and latitudinal (`ylim`) boundaries of the map, to be expressed as decimal degree coordinates. Unnecessary if zoom is set to any value other than `"custom"`

print_message

Logical value. Can be set to `FALSE` to shut down the warning on run time.

Value

A ggplot map of the alpha convex hull on top of the lyde data.

Examples

if (FALSE) { # \dontrun{
map_alphahull(bio_year = 2025)

map_alphahull(use_public = TRUE, bio_year = 2022, zoom = "full")

} # }