Skip to content

Commit

Permalink
Add datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-rohan-NOAA committed Jan 10, 2025
1 parent f43f9e4 commit 0fa8058
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ output
.github
AI_gear_performance.qmd
GOA_gear_performance.qmd
EBS_gear_performance.qmd
EBS_gear_performance.qmd
plots
assets
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: trawlmetrics
Type: Package
Title: Trawl effort correction and gear performance measures
Version: 0.0.3
Date: 2024-09-27
Version: 0.0.4
Date: 2025-01-10
Authors@R: c(person("Sean", "Rohan", email = "[email protected]", role = c("aut", "cre")),
person("Caitlin", "Allen-Akselrud", email = "[email protected]", role = c("aut")),
person("Shannon", "Nardi", email = "[email protected]", role = "aut"),
Expand All @@ -15,7 +15,7 @@ Description: Perform trawl effort correction and retrieve gear performance measu
License: GPL (>=2)
Encoding: UTF-8
LazyData: false
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Imports: cowplot, mgcv, stats, tibble, dplyr, janitor, RODBC, getPass, here, lubridate, lme4
Suggests: knitr, rmarkdown, colorspace, viridis, flextable
VignetteBuilder: knitr
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(bts_geom)
export(flume_tank)
export(get_bottom_contacts)
export(get_bottom_data)
export(get_connected)
Expand Down
11 changes: 7 additions & 4 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
trawlmetrics 0.0.4 (January 10, 2025)
----------------------------------------------------------------

IMPROVEMENTS

- Added historical height and spread data as built-in data.

trawlmetrics 0.0.3 (September 27, 2024)
----------------------------------------------------------------

Expand All @@ -15,15 +22,11 @@ IMPROVEMENTS
- Improve ODBC handling in get_trawlmetrics().
- Add DISTANCE_FISHED and DURATION to get_trawlmetrics() output.



trawlmetrics 0.0.1 (September 25, 2024)
----------------------------------------------------------------

- Initial release.



trawlmetrics 2024.08.21 (August 21, 2024)
----------------------------------------------------------------

Expand Down
62 changes: 62 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#' Bottom trawl survey net height and spread
#'
#' Net height and spread data from good performance index station hauls from NOAA Fisheries Alaska Fisheries Science Center bottom trawl surveys in the eastern Bering Sea shelf, northern Bering Sea, eastern Bering Sea slope, Gulf of Alaska, and Aleutian Islands. Codes are described in the RACE Groundfish Asessment Program [species and data code manuals](https://www.fisheries.noaa.gov/resource/document/groundfish-survey-species-code-manual-and-data-codes-manual).
#'
#' @format A data frame
#' \describe{
#' \item{SURVEY_DEFINITION_ID}{The survey definition ID key code is an integer that uniquely identifies a survey region/survey design.}
#' \item{CRUISE}{This is a six-digit integer identifying the cruise number of the form: YYYY99 (where YYYY = year of the cruise; 99 = 2-digit number and is sequential; 01 denotes the first cruise that vessel made in this year, 02 is the second, etc.).}
#' \item{YEAR}{Year the observation (survey) was collected.}
#' \item{VESSEL_ID}{ID number of the vessel used to collect data for that haul.}
#' \item{SURVEY_NAME}{Long name of the survey conducted}
#' \item{VESSEL_NAME}{Name of the vessel used to collect data for that haul.}
#' \item{DEPTH_M}{Bottom depth (meters).}
#' \item{WIRE_LENGTH_M}{Length of wire deployed during a given haul in meters.}
#' \item{GEAR}{Bottom trawl survey gear code.}
#' \item{ACCESSORIES}{Type of accessories used on net.}
#' \item{HAUL}{This number uniquely identifies a sampling event (haul) within a cruise. It is a sequential number, in chronological order of occurrence.}
#' \item{DISTANCE_FISHED_KM}{Distance the net fished (thousands of kilometers).}
#' \item{NET_WIDTH_M}{Measured or estimated distance (meters) between wingtips of the trawl.}
#' \item{NET_HEIGHT_M}{Measured or estimated distance (meters) between footrope and headrope of the trawl.}
#' \item{DURATION_HR}{This is the elapsed time between start and end of a haul (decimal hours).}
#' \item{GEAR_NAME}{Gear name as a character vector.}
#' }
#' @source \url{https://www.fisheries.noaa.gov/contact/groundfish-assessment-program}
#' @export
"bts_geom"

#' Flume tank experimental data
#'
#' Net measurement data from flume tank experiments conducted at the Centre for Sustainable Aquatic Resources (CSAR), Memorial University of Newfoundland, St. John's, Newfoundland and Labrador from January 13-17, 2025. CURRENTLY EXAMPLE DATA.
#'
#' @format A data frame
#' \describe{
#' \item{date_time_nst}{Date and time in Newfoundland Standard Time (UTC-3.5).}
#' \item{trial}{Trial number.}
#' \item{trawl}{Trawl model (e.g., "83-112", "PNE", "RACE").}
#' \item{bridles}{Type of bridles used (e.g., "standard", "bridle 1", "bridle 2").}
#' \item{footrope}{Footrope used on the trawl (e.g., "EBS" or "GOA").}
#' \item{pulling_point_elevation_m}{Elevation of the pulling point on the trawl mast in meters.}
#' \item{backstrap_length_m}{Backstrap length in meters.}
#' \item{bridle_u_length_m}{Upper bridle length in meters.}
#' \item{bridle_l_length_m}{Lower bridle length in meters.}
#' \item{sweep_length_m}{Sweep length in meters.}
#' \item{u_bridle_extension_m}{Upper bridle extension length in meters.}
#' \item{towing_speed_kn}{Towing speed in knots.}
#' \item{spread_door_m}{Door spread in meters.}
#' \item{spread_u_wing_m}{Upper wing spread in meters.}
#' \item{spread_l_wing_m}{Lower wing spread in meters.}
#' \item{spread_mean_we_m}{Mean wing spread in meters.}
#' \item{opening_wing_m}{Wing opening height in meters.}
#' \item{opening_headline_m}{Headline opening height in meters.}
#' \item{height_headline_m}{Headline opening height from the bottom in meters.}
#' \item{bridle_tension_port_t}{Port bridle tension in metric tons.}
#' \item{bridle_tension_stbd_t}{Starboard bridle tension in metric tons.}
#' \item{bridle_tension_total_t}{Total bridle tension in metric tons.}
#' \item{mouth_area_m2}{Mouth opening area in square meters.}
#' \item{mouth_drag_kgf_m2}{Mouth drag in kilogram-force per square meter.}
#' \item{bridle_angle_deg}{Bridle angle of attack in degrees.}
#' }
#' @source \url{https://www.fisheries.noaa.gov/contact/groundfish-assessment-program}
#' @export
"flume_tank"
Binary file added R/sysdata.rda
Binary file not shown.
13 changes: 13 additions & 0 deletions analysis/flume_tank/01_add_data_to_package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
library(trawlmetrics)
library(xlsx)

# dir.create(here::here("data"))

# Historical geometry data from hauls where trawl geometry was measured
bts_geom <- readRDS(file = here::here("analysis", "flume_tank", "data", "HEIGHT_SPREAD_EBS_NBS_GOA_AI.rds"))

# Load flume tank data
flume_tank <- read.xlsx(file = here::here("analysis", "flume_tank", "data", "flume_tank_data.xlsx"),
sheetName = 'example')

save(bts_geom, flume_tank, file = here::here("R", "sysdata.rda"))
File renamed without changes.
Binary file not shown.
Binary file added analysis/flume_tank/data/flume_tank_data.xlsx
Binary file not shown.
Binary file removed analysis/flume_tank/data/test_data.xlsx
Binary file not shown.
17 changes: 17 additions & 0 deletions assets/gps_flowchart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Flowchart for changing event times

``` mermaid
graph TD
A["User enters new event time"]-->B["Is there a GPS fix for<br>the event time?"]--> |Yes| C["Assign the GPS fix that matches<br>the event time to the event.
"]
B["Is there a GPS fix for<br>the event time?"]--> |No| D["Are there GPS fixes before and<br>after the new event time that<br>are within XX seconds of the<br>event time?"]
D--> |Yes| E["Assign by GPS fix by<br>interpolating<br>between fixes."]
D--> |No| F["No automatic GPS fix (leave blank)"]
subgraph User steps
F--> G["Are GPS data<br>available from a<br>backup data source?"]
G--> |Yes| H["Import .gps file into<br>Poseidon"]
G--> |No| I["Manually enters coordinates<br>from paper forms."]
I-->A
```
37 changes: 37 additions & 0 deletions man/bts_geom.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions man/flume_tank.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0fa8058

Please sign in to comment.