View source: R/util-convert_otn_to_att.r
convert_otn_to_att | R Documentation |
Convert glatos_detections
, OTN tagging metadata and OTN deployment
metadata to ATT
format for use in the Animal Tracking Toolbox
https://github.com/vinayudyawer/ATT, now part of VTrack
https://github.com/RossDwyer/VTrack.
convert_otn_to_att(
detectionObj,
taggingSheet,
deploymentObj = NULL,
deploymentSheet = NULL,
timeFilter = TRUE,
crs = sf::st_crs(4326)
)
detectionObj |
A |
taggingSheet |
a data frame from |
deploymentObj |
a data frame from |
deploymentSheet |
a data frame from |
timeFilter |
Whether the data should be filtered using the deployment and recovery/last download times of receivers. Defaults to TRUE, if not all receiver metadata is available, this should be set to FALSE otherwise there will be data loss. |
crs |
an object of class |
This function takes 3 data frames containing detections, tagging
metadata, and deployment metadata from either read_otn_deployments
or prepare_deploy_sheet
and transforms them into 3
tibble
objects inside of a list. The input that AAT uses to
get this data product is located here:
https://github.com/vinayudyawer/ATT/blob/master/README.md and our mappings
are found here: https://github.com/ocean-tracking-network/glatos/issues/75#issuecomment-982822886
in a comment by Ryan Gosse.
a list of 3 tibbles containing tag detections, tag metadata, and station metadata, to be ingested by VTrack/ATT
Ryan Gosse
## Not run:
#--------------------------------------------------
# EXAMPLE #1 - loading from Deployment Object
library(glatos)
dets_path <- system.file("extdata", "blue_shark_detections.csv",
package = "glatos"
)
deploy_path <- system.file("extdata", "hfx_deployments.csv",
package = "glatos"
)
tag_path <- system.file("extdata", "otn_nsbs_tag_metadata.xls",
package = "glatos"
)
dets <- read_otn_detections(dets_path)
tags <- prepare_tag_sheet(tag_path, 5, 2)
deploy <- read_otn_deployments(deploy_path)
ATTdata <- convert_otn_to_att(dets, tags, deploymentObj = deploy)
## End(Not run)
#--------------------------------------------------
# EXAMPLE #2 - loading from Deployment Sheet
library(glatos)
dets_path <- system.file("extdata", "blue_shark_detections.csv",
package = "glatos"
)
deploy_path <- system.file("extdata", "hfx_deploy_simplified.xlsx",
package = "glatos"
)
tag_path <- system.file("extdata", "otn_nsbs_tag_metadata.xls",
package = "glatos"
)
dets <- read_otn_detections(dets_path)
tags <- prepare_tag_sheet(tag_path, 5, 2)
deploy <- prepare_deploy_sheet(deploy_path, 1, 1)
ATTdata <- convert_otn_to_att(dets, tags, deploymentSheet = deploy)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.