Skip to content

Commit 6f0ab4b

Browse files
committed
refine join chain
1 parent 852a212 commit 6f0ab4b

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

R/preprocessing-surveys.R

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,10 @@ preprocess_landings_lurio <- function(log_threshold = logger::DEBUG) {
5656
readr::read_rds() |>
5757
purrr::keep_at(c("taxa", "gear", "vessels", "sites", "geo")) |>
5858
purrr::map(
59-
~ dplyr::filter(
60-
.x,
61-
stringr::str_detect(
62-
.data$form_id,
63-
paste0("(^|,\\s*)", !!target_form_id, "(\\s*,|$)")
64-
)
65-
)
59+
~ dplyr::filter(.x, stringr::str_detect(.data$form_id, ...))
60+
) |>
61+
purrr::map(
62+
~ dplyr::select(.x, -dplyr::any_of(c("country", "latitude", "longitude")))
6663
)
6764

6865
# get raw landings from cloud storage
@@ -387,13 +384,10 @@ preprocess_landings_adnap <- function(log_threshold = logger::DEBUG) {
387384
readr::read_rds() |>
388385
purrr::keep_at(c("taxa", "gear", "vessels", "sites", "geo")) |>
389386
purrr::map(
390-
~ dplyr::filter(
391-
.x,
392-
stringr::str_detect(
393-
.data$form_id,
394-
paste0("(^|,\\s*)", !!target_form_id, "(\\s*,|$)")
395-
)
396-
)
387+
~ dplyr::filter(.x, stringr::str_detect(.data$form_id, ...))
388+
) |>
389+
purrr::map(
390+
~ dplyr::select(.x, -dplyr::any_of(c("country", "latitude", "longitude")))
397391
)
398392

399393
# get raw landings from cloud storage

0 commit comments

Comments
 (0)