Description Usage Arguments Value Examples
plot_dive
creates a plot of a single dive in two panels. The left
panel zooms in on the dive itself and the right panel is an overview of the
entire event. In the left panel, blue points are within the dive and red
points are the surrounding records for context. The right panel has two
curves. The red one shows the original, pre-calibration points. The green
one is the calibrated dive with the surface offset applied. The shaded
region delineates the dive itself. In both panels, the dashed blue line
indicates the surface noise threshold.
1 | plot_dive(calib_tdr, diveid, surface_thr = 0.1)
|
calib_tdr |
data.frame. Use |
diveid |
integer. Identifier of dive to plot. |
surface_thr |
numeric. Threshold for surface noise. |
gtable with two plots.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Load metadata
metadata_path <- system.file('extdata',
'MOC2015PFSHmetadata.csv',
package = 'pfsh.dive')
metadata <- readr::read_csv(metadata_path)
# Read CEFAS output
tdr_path <- system.file('extdata',
paste0(metadata$TDR_filename[1], '.CSV'),
package = 'pfsh.dive')
tdr <- read_cefas(tdr_path,
metadata$Deployed[1],
metadata$Recovered[1])
# Calibrate TDR data
calib_tdr <- calibrate_tdr(tdr, metadata$DeployID[1])
# Plot a dive
plot_dive(calib_tdr, 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.