From eaf49b74d5527f3b8327750345423d29a74a70f9 Mon Sep 17 00:00:00 2001 From: Bruce Delo Date: Mon, 12 Feb 2024 10:43:19 -0400 Subject: [PATCH] Changes before branch swap. --- R/imos_otn_column_map.R | 3 ++- R/otn_imos_column_map.R | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/R/imos_otn_column_map.R b/R/imos_otn_column_map.R index 22f0e59..29b6566 100644 --- a/R/imos_otn_column_map.R +++ b/R/imos_otn_column_map.R @@ -47,7 +47,8 @@ imos_otn_column_map <- function(det_dataframe, transmitter_id, transmitter_sensor_raw_value, transmitter_sensor_unit, - station_name + station_name, + receiver_id ) %>% mutate( # cleandate = ymd(as_date(detection_datetime)), diff --git a/R/otn_imos_column_map.R b/R/otn_imos_column_map.R index c18234c..0f3b6de 100644 --- a/R/otn_imos_column_map.R +++ b/R/otn_imos_column_map.R @@ -351,7 +351,8 @@ derive_rcvr_from_det <- function(det_dataframe) { latitude, receiver_group, minDetectionDate, - maxDetectionDate + maxDetectionDate, + collectioncode, ) %>% unite( receiver_deployment_id, c("receiver_group", "station", "receiver"), @@ -364,12 +365,12 @@ derive_rcvr_from_det <- function(det_dataframe) { receiver_name = receiver, depth_below_surface = receiver_depth, receiver_deployment_longitude = longitude, - receiver_deployment_latitude = latitude + receiver_deployment_latitude = latitude, + receiver_project_name = collectioncode ) %>% mutate( # Add NA-filled columns for anything that can't be derived. purchasing_organisation = NA, - receiver_project_name = NA, receiver_status = NA, receiver_deployment_datetime = NA, receiver_recovery_datetime = NA, @@ -425,17 +426,18 @@ derive_tag_from_det <- function(det_dataframe) { daycollected, longitude, latitude, - catalognumber + catalognumber, + collectioncode, ) %>% rename( transmitter_id = tagname, species_common_name = commonname, species_scientific_name = scientificname, - transmitter_deployment_id = catalognumber + transmitter_deployment_id = catalognumber, + tagging_project_name = collectioncode ) %>% mutate( transmitter_serial_number = NA, - tagging_project_name = NA, transmitter_type = NA, transmitter_sensor_type = NA, transmitter_sensor_slope = NA,