This R package facilitates access and analysis of NFSC Continuous Plankton Recorder (CPR) data. Data can imported from distributed Excel spreadsheets into data frames, tibbles or sf tables.
Part of this dataset was obtained from NOAA’s NFSC on 20 January 2024 and might not represent the most up to date data. Please contact NOAA directly for the most recent data. The balance of this dataset is avaiable from the NERACOOS ERDDAP server.
remotes::install_github("BigelowLab/cprdata")
The data set contains both zooplankton and phytoplankton data from the Mid-Atlantic Bight and Gulf of Maine regions. We regularly access to the zooplankton data, but it is easy to switch to phytoplankton. We can read the data in its “raw” state as a simple table or transformed into a sf POINT table.
library(cprdata)
x = read_cpr(name = "phytoplankton", form = "table") |>
dplyr::glimpse()
## Rows: 1,649,128
## Columns: 9
## $ source <chr> "nfsc", "nfsc", "nfsc", "nfsc", "nfsc", "nfsc", "nfsc", "nfs…
## $ cruise <chr> "EG7107", "EG7107", "EG7107", "EG7107", "EG7107", "EG7107", …
## $ station <dbl> 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, …
## $ time <dttm> 1971-11-15 17:00:00, 1971-11-15 17:00:00, 1971-11-15 17:00:…
## $ lon <dbl> -71.7666, -71.7666, -71.7666, -71.7666, -71.7666, -71.7666, …
## $ lat <dbl> 39.6, 39.6, 39.6, 39.6, 39.6, 39.6, 39.6, 39.6, 39.6, 39.6, …
## $ pci <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
## $ abundance <dbl> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, …
## $ name <chr> "Paralia sulcata [9000]", "Skeletonima costatum [9001]", "Th…
Note that we switch to reading zooplankton data and add a stage
variable.
x = read_cpr(name = "zooplankton", form = "sf") |>
dplyr::glimpse()
## Rows: 5,697,206
## Columns: 9
## $ source <chr> "nfsc", "nfsc", "nfsc", "nfsc", "nfsc", "nfsc", "nfsc", "nfs…
## $ cruise <chr> "EG7107", "EG7107", "EG7107", "EG7107", "EG7107", "EG7107", …
## $ station <dbl> 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, …
## $ time <dttm> 1971-11-15 17:00:00, 1971-11-15 17:00:00, 1971-11-15 17:00:…
## $ pci <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
## $ abundance <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
## $ name <chr> "Unidentified plankton and fragments", "Copepoda", "Copepoda…
## $ stage <chr> "unstaged", "nauplius", "copepodite v", "parva (postlarva)",…
## $ geometry <POINT [°]> POINT (-71.7666 39.6), POINT (-71.7666 39.6), POINT (-…
suppressPackageStartupMessages({
library(sf)
library(rnaturalearth)
})
coast = ne_coastline(scale = "medium", returnclass = "sf")
plot(st_geometry(coast), extent = x, axes = TRUE)
plot(st_geometry(x), pch = ".", col = "orange", add = TRUE)