The CalCOFI grid (cc_grid
) and centroids
(cc_grid_ctrs
) show the CalCOFI
Station Positions – CalCOFI at varying separation distances of
station positions (sta_dpos
) in the CalCOFI coordinate
system from nearshore (5
), to offshore (10
) to
outside the 113 extended station pattern to historically visited areas
(20
).
This allows summarization of effort within each station and defining
a study area according to these criteria (e.g.,
sta_dpos
).
# show first 6 rows of example data frame with temperature in space as variable
head(cc_bottle)
#> # A tibble: 6 × 10
#> lon lat date quarter depth_m sta_dpos t_degc salinity o2sat n
#> <dbl> <dbl> <date> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <int64>
#> 1 -134. 42.5 1972-05-16 2 0 20 11.2 32.9 109 1
#> 2 -134. 42.5 1972-05-16 2 10 20 11.2 32.9 109. 1
#> 3 -134. 42.5 1972-05-16 2 20 20 10.9 32.9 110. 1
#> 4 -134. 42.5 1972-05-16 2 30 20 10.6 32.9 110 1
#> 5 -134. 42.5 1972-05-16 2 50 20 9.97 32.9 108. 1
#> 6 -134. 42.5 1972-05-16 2 55 20 9.83 32.9 107. 1
# summarize temperature by location and convert to points
d_t <- cc_bottle %>%
filter(
!is.na(t_degc)) %>%
group_by(lon, lat) %>%
summarize(
n = n(),
v = mean(t_degc),
.groups = "drop") %>%
st_as_sf(
coords = c("lon", "lat"), remove = F,
crs = 4326)