Skip to content

Commit

Permalink
Changes before branch swap.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackVanish committed Feb 12, 2024
1 parent ed90180 commit eaf49b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion R/imos_otn_column_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
14 changes: 8 additions & 6 deletions R/otn_imos_column_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit eaf49b7

Please sign in to comment.