Skip to content

Commit

Permalink
Tweak commerical biosamples discards algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
seananderson committed Jul 17, 2024
1 parent 413f4cd commit 549b064
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: gfdata
Title: Data Extraction for DFO PBS Groundfish Stocks
Version: 0.1.2
Version: 0.1.3
Authors@R: c(
person(c("Elise", "A."), "Keppel", role = "aut"),
person(c("Sean", "C."), "Anderson",
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Updates to gfdata

## 0.1.3 2024-07-17

- For commercial biological samples: discards with a null sample source code are
now coded as discards instead of unknown.

## 2023-07-13

- HBLL INS (ssid: 39, 40) are now included in the default call for `get_survey_sets()`

## 2019-05-2019

- Year, month and catch calculation moved to sql code instead of tidy funcion
to reduce run time on already extracted data.
- Beginning to adapt tidy_cpue_index to work for hook and line data in additon
Expand Down
2 changes: 1 addition & 1 deletion inst/sql/get-comm-samples.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SELECT TRIP_START_DATE,
THEN 'KEEPERS'
WHEN SPECIES_CATEGORY_CODE = 1 AND SAMPLE_SOURCE_CODE = 3
THEN 'DISCARDS'
WHEN SPECIES_CATEGORY_CODE = 4 AND SAMPLE_SOURCE_CODE IN(1, 3)
WHEN SPECIES_CATEGORY_CODE = 4 AND (SAMPLE_SOURCE_CODE IS NULL OR SAMPLE_SOURCE_CODE IN(1, 3))
THEN 'DISCARDS'
ELSE 'UNKNOWN' END AS SAMPLING_DESC,
VESSEL_ID
Expand Down

0 comments on commit 549b064

Please sign in to comment.