Skip to contents

Returns the built-in survey_blocks dataset as either polygons, centroids, or coordinates. Survey blocks are 2x2 km square grids that may overlap with land. Note that centroid and coordinate outputs may fall on land rather than in the ocean. While suitable for visualization and basic modeling, these points should not be used directly for extracting oceanographic covariates - instead use polygon and extract as appropriate.

Usage

load_survey_blocks(type = c("polygon", "centroid", "XY"), active_only = TRUE)

Arguments

type

Character string specifying the output format. One of:

  • "polygon" (default): returns an sf object with polygon geometries.

  • "centroid": returns an sf object with the centroid point for each block.

  • "XY": returns a tibble with columns X and Y (in kilometres), representing point-on-surface coordinates extracted from each polygon.

active_only

Logical. If TRUE (default), only returns active survey blocks.

Value

Either an sf object or a tbl depending on type.

Examples

if (FALSE) { # \dontrun{
load_survey_blocks("polygon") |>
  ggplot() +
  geom_sf(aes(fill = survey_abbrev)) +
  theme_minimal()
load_survey_blocks("centroid") |>
  ggplot() +
  geom_sf(aes(colour = survey_abbrev)) +
  theme_minimal()
load_survey_blocks("XY") |>
  ggplot() +
  geom_point(aes(x = X, y = Y)) +
  theme_minimal()
} # }