View source: R/util-convert_glatos_to_att.r
convert_glatos_to_att | R Documentation |
Convert glatos_detections
and glatos_receiver
objects to ATT
for
compatibility with the Animal Tracking Toolbox
https://github.com/vinayudyawer/ATT, now part of VTrack
https://github.com/RossDwyer/VTrack.
convert_glatos_to_att(detectionObj, receiverObj, crs = sf::st_crs(4326))
detectionObj |
A |
receiverObj |
A |
crs |
an object of class |
This function takes 2 lists containing detection and reciever data
and transforms them into one list containing 3 tibble
objects. 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.
Note that the Tag.Detections
element of the output can contain
fewer records than detectionObj
because detections are omitted if they
do not match a station deployment-recovery interval in receiverObj
.
For example, in the walleye data example, walleye_detections
contains
7180 rows but Tag.Detectons
output only contains 7083 rows.
a list of 3 tibbles containing tag detections, tag metadata, and station metadata, to be ingested by VTrack/ATT
Ryan Gosse
#--------------------------------------------------
# EXAMPLE #1 - loading from the vignette data
library(glatos)
wal_det_file <- system.file("extdata", "walleye_detections.csv",
package = "glatos"
)
walleye_detections <- read_glatos_detections(wal_det_file) # load walleye data
rec_file <- system.file("extdata", "sample_receivers.csv",
package = "glatos"
)
rcv <- read_glatos_receivers(rec_file) # load receiver data
ATTdata <- convert_glatos_to_att(walleye_detections, rcv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.