View source: R/util-convert_otn_erddap_to_att.r
| convert_otn_erddap_to_att | R Documentation |
Convert glatos_detections and transmitter, receiver, and animal
metadata from the OTN ERDDAP to ATT format for use in the Animal
Tracking Toolbox (https://github.com/vinayudyawer/ATT).
convert_otn_erddap_to_att(detectionObj, erdTags, erdRcv, erdAni)
detectionObj |
a data frame from |
erdTags |
a data frame with tag release data from the OTN ERDDAP |
erdRcv |
a data frame with receiver station data from the OTN ERDDAP |
erdAni |
a data frame with animal data from the OTN ERDDAP |
This function takes 4 data frames containing detection, and ERDDAP
data from the tags, receivers, and animals tables, and transforms them into
3 tibble::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://gitlab.oceantrack.org/GreatLakes/glatos/issues/83
in a comment by Ryan Gosse. The OTN ERDDAP instance is here:
https://members.oceantrack.org/erddap/tabledap/index.html but please note
that this only contains public data.
a list of 3 tibble::tibbles containing tag dectections, tag metadata, and station metadata, to be ingested by VTrack/ATT
Ryan Gosse
#--------------------------------------------------
# EXAMPLE #1 - loading from the OTN ERDDAP + vignettes
library(glatos)
#get path to example files from OTN ERDDAP
ani_erd_file <- system.file("extdata", "otn_aat_animals.csv",
package = "glatos")
animals <- read.csv(ani_erd_file) # load the CSVs from ERDDAP
tags_erd_file <- system.file("extdata", "otn_aat_tag_releases.csv",
package = "glatos")
tags <- read.csv(tags_erd_file)
rcv_erd_file <- system.file("extdata", "otn_aat_receivers.csv",
package = "glatos")
stations <- read.csv(rcv_erd_file)
#Remove first row; (blank or metadata about the column)
animals <- animals[-1,]
tags <- tags[-1,]
stations <- stations[-1,]
#get blue shark example data
shrk_det_file <- system.file("extdata", "blue_shark_detections.csv",
package = "glatos")
blue_shark_detections <- read_otn_detections(shrk_det_file) # load shark data
ATTdata <- convert_otn_erddap_to_att(blue_shark_detections,
tags, stations, animals)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.