Learn R Programming

Tivy (version 0.1.1)

plot_fishing_zones: Plot fishing zones

Description

Creates visualizations of fishing zones using either ggplot2 (static) or leaflet (interactive). This function consolidates all zone plotting functionality.

Usage

plot_fishing_zones(
  data,
  coastline = NULL,
  parallels = NULL,
  type = "static",
  title = NULL,
  colors = NULL,
  show_legend = FALSE,
  legend_title = NULL,
  zone_labels = NULL,
  add_grid = FALSE,
  base_layers = FALSE,
  minimap = FALSE
)

Value

ggplot object (static) or leaflet object (interactive).

Arguments

data

Data frame with fishing zone coordinates and metadata.

coastline

Data frame with coastline coordinates (columns "Long" and "Lat"). If NULL, uses internal dataset.

parallels

List of data frames with coast-parallel lines.

type

Plot type: "static" for ggplot2 or "interactive" for leaflet.

title

Plot title.

colors

Vector of colors for zones. If NULL, auto-generated.

show_legend

Logical. Show legend/layer control.

legend_title

Legend title.

zone_labels

Vector of custom labels for zones.

add_grid

Logical. Add coordinate grid (static only).

base_layers

Logical. Include multiple base map layers (interactive only).

minimap

Logical. Add minimap (interactive only).

Examples

Run this code
if (FALSE) {
plot_fishing_zones(
  data = zone_data,
  coastline = coastline_data,
  type = "static",
  title = "Fishing Zones",
  show_legend = TRUE
)

plot_fishing_zones(
  data = zone_data,
  coastline = coastline_data,
  type = "interactive",
  base_layers = TRUE,
  minimap = TRUE
)
}

Run the code above in your browser using DataLab