get_bins: Get bin info at 4km and 9km resolution

View source: R/bin_funcs.R

get_binsR Documentation

Get bin info at 4km and 9km resolution

Description

Get corresponding bin number, latitude, longitude and depth for Pan-Canadian Grid or subregions. These are vectors of bin/lat/lon/bathymetry that have already been generated for easier access.

Usage

get_bins(region = "pancan", resolution = "4km", variables = "all")

Arguments

region

String, either "pancan", "nwa", "nep", or "gosl"

resolution

String, either "4km" or "9km".

variables

String with columns: blank or "all" for all columns, or a subset of c("bin","longitude","latitude","bathymetry")

Value

Data frame with columns of bin, longitude, latitude, bathymetry

Examples

library(dplyr)
library(ggplot2)
library(oceancolouR)

pancan_bins_4km <- get_bins()

# Map of the North West Atlantic bin bathymetry
get_bins(region = "nwa", resolution = "9km") %>%
ggplot(aes(x = longitude, y = latitude, colour = bathymetry)) +
   geom_point(size = 0.5) +
   scale_colour_gradientn(colours = pals::ocean.deep(30))

BIO-RSG/oceancolouR documentation built on April 20, 2024, 6:40 a.m.