A unified function for visualizing tracking data and home range polygons on an interactive map. Accepts tracking points (from `ez_track`) and home ranges (from `ez_home_range`), and allows layer-specific customization of appearance and filtering by time.
Usage
ez_map(
tracks = NULL,
home_ranges = NULL,
individual = NULL,
show_points = TRUE,
show_paths = TRUE,
point_color = "id",
point_size = 4,
point_opacity = 0.8,
point_stroke = TRUE,
point_stroke_color = "black",
path_color = "id",
path_width = 2,
path_opacity = 1,
polygon_color = "id",
polygon_opacity = 0.4,
color_palette = "viridis",
show_labels = TRUE,
start_date = NULL,
end_date = NULL
)
Arguments
- tracks
Output from `ez_track()` — a data frame or `sf` with `id`, `timestamp`, `x`, `y`.
- home_ranges
Output from `ez_home_range()` or any `sf` polygon object.
- individual
Optional. Character or character vector of individual ID(s) to display.
- show_points
Logical, whether to draw individual locations. Default TRUE.
- show_paths
Logical, whether to draw movement paths. Default TRUE.
- point_color
Column name or static color for points. Default "id". Can also be "timestamp" for temporal gradient.
- point_size
Radius of point markers. Default 4.
- point_opacity
Fill opacity of points. Default 0.8.
- point_stroke
Logical, whether to draw point borders. Default TRUE.
- point_stroke_color
Border color for points. Default "black".
- path_color
Column name or static color for paths. Default "id".
- path_width
Line width of movement paths. Default 2.
- path_opacity
Opacity of path lines. Default 1.
- polygon_color
Column name or static color for home range polygons. Default "id".
- polygon_opacity
Fill opacity of polygons. Default 0.4.
- color_palette
Color palette to use for all mapped variables. Default "viridis".
- show_labels
Logical, whether to show hover labels for locations. Default TRUE.
- start_date
Optional filter (Date or string) to remove data before this date.
- end_date
Optional filter (Date or string) to remove data after this date.