Skip to content

Commit

Permalink
load update
Browse files Browse the repository at this point in the history
  • Loading branch information
tymjackson committed Oct 15, 2024
1 parent 43e8698 commit 6fef05d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions R/load_crab_dump.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ load_crab_dump <- function(path, stock, database_pull = F, clean = T) {
if(stock %in% c("AIGKC", "EAG", "WAG")) {
## data mgmt specific to gkc
out %>%
# make XE fisheries EAG
mutate(subdistrict = ifelse(substring(fishery, 1, 2) == "XE", "EAG", subdistrict),
fishery = paste0(substring(fishery, 1, 2), substring(crab_year, 3, 4))) %>%
# fill in legal
add_legal(., stock = stock) %>%
# add regulatory group
Expand Down
3 changes: 2 additions & 1 deletion R/load_dockside.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ load_dockside <- function(path, stock, database_pull = F, clean = T) {
mutate(subdistrict = case_when(crab_year != 2008 ~ subdistrict,
(crab_year == 2008 & adfg %in% c(35767, 37887)) ~ "WAG",
(crab_year == 2008 & adfg %in% c(103, 5992, 20556)) ~ "EAG",
(crab_year == 2008 & adfg == 5992 & sample_date > as_date("2008-12-1")) ~ "WAG")) -> out
(crab_year == 2008 & adfg == 5992 & sample_date > as_date("2008-12-1")) ~ "WAG")) %>%
mutate(fishery = paste0(substring(fishery, 1, 2), substring(crab_year, 3, 4))) -> out
}
if(stock == "EAG"){
out %>%
Expand Down

0 comments on commit 6fef05d

Please sign in to comment.