downloads, restructures & formats metadata, appends dive/CTD start and end datetimes (for QC), & fills in missing required metadata - eg. release_datetime, release_longitude/latitude's with data from the GPS (if present) or Argos location file.
get_metadata(
source = "smru",
tag_mfr = "smru",
tag_data = NULL,
cid = NULL,
user = NULL,
pwd = NULL,
dropIDs = NULL,
file = NULL,
meta.args,
subset.ids = NULL,
wc.meta = NULL,
QCmode = NULL,
build.meta = FALSE,
server.check = TRUE,
path2mdb = NULL,
p2mdbtools = NULL,
prov.dir = NULL,
prov.name = NULL
)the source of the deployment metadata, current options are
imos, otn, smru, or atn. If source = 'imos' or source = 'atn' then
metadata are obtained from user-provided .CSV file via the config.json file.
If sourcce = 'smru' then metadata are built from a combination of SMRU
server details & deployment details in the config.json file.
the tag manufacturer, current options are smru or wc
cid SMRU campaign ids
a list of either smru data tables or wc files as output by
pull_data.
SMRU campaign id must be provided when the tag_mfr is smru
SMRU data server username as a quoted string - to be used only if
metadata are to be built from SMRU server details (source = 'smru').
SMRU data server password as a quoted string - to be used only if
metadata are to be built from SMRU server details (source = 'smru').
SMRU refs or WC ids to be dropped from QC
path to metadata .csv file, if provided then metadata will be
read from the provided source
optional metadata fields to be passed from config file when downloading tag metadata from SMRU server. Typically used only when no metadata filepath is provided in the config file.
a character vector of comma-separated (no spaces) WC UUID's
to be included in the QC. Ignored if tag_mfr != "wc".
an R data.frame of Wildlife Computers tag deployment metadata
obtained via download_data(). Typically used only when no metadata filepath
is provided in the config file.
"nrt" or "dm". For IMOS metadata in delayed-mode QC, the
tag identifiers are checked against the SMRU data server (see
smru_clean_meta_imos())
logical; delayed-mode QC only. Build the metadata of
deployments missing from the metadata file from the SMRU data server, the
.mdb deployments table, the Argos locations and meta.args
logical; delayed-mode QC of IMOS metadata only. Check
ptt, body, WMO ID and tag type against the SMRU data server (default
TRUE). FALSE takes them from the metadata file unchecked; build.meta
must then be FALSE. Set by "server.check" in the config setup block
the .mdb folder and the mdbtools path (used when
build.meta = TRUE)
near real-time QC of SMRU tags without a metadata file: the
folder of the provisional metadata files, <cid>_metadata_provisional.csv
(see smru_meta_provisional()); or near real-time QC of Wildlife Computers
tags without a metadata file: the folder of <prov.name>_metadata_provisional.csv
(see wc_meta_provisional()). NULL (default) builds the metadata from the
SMRU server or the Wildlife Computers Portal on every run
Wildlife Computers only: the provisional metadata file name stem (the config file name without "config_" and ".json")