pkgdown/analytics.html Skip to contents

Import Swiss Ornithological Institute (SOI) geolocator exports into a new GeoLocator Data Package. The function reads available raw tag data from directory_data, derives measurements, and builds tags and optionally prefilled observations from the supplied SOI summary table.

See an example of use with this tutorial.

Usage

read_soi(gdl, directory_data, generate_observations = TRUE)

Arguments

gdl

A data frame of SOI export metadata, typically returned by read_soi_gld(). It must contain at least GDL_ID, OrderName unless it has a directory column, and the fields needed to derive package metadata. tags$attachment_type is built from the harness columns (Harness_data, HarnessMaterial_data, HarnessAttachement_data, HarnessThickness, LegHarnessDiameter, BreastHarnessDiameterHead and BreastHarnessDiameterTail), which read_soi_gld(filter_col = TRUE) does not keep: use filter_col = FALSE to include them.

directory_data

Path to the directory containing SOI raw tag files or folders, in one sub-folder per OrderName. Within it, a tag's data is the folder, or else the .glf file, whose name is the GDL_ID alone or followed by a non-alphanumeric separator (e.g. A1 or A1_2020, but not A10_2020). When several match, the alphabetically last is used, with a warning naming the candidates. Not used when gdl already has a directory column, which gives the data path of each tag directly.

generate_observations

A logical value. Equipment and retrieval observations, with device_status = "present", are always created from the dates in gdl. If TRUE, rows are also created without a datetime, as placeholders to fill in; if FALSE, only rows with a known datetime are kept.

Value

A geolocatordp object.

Details

The function performs the following steps:

  • Retrieves the data directory for each GDL_ID when not already present.

  • Creates GeoPressureR tag objects for tags with available data.

  • Extracts measurements and adds them as a package resource.

  • Derives tags and observations from gdl and adds them as resources.

See also

read_soi_gld() to prepare the SOI input table and tags_to_measurements() for the underlying conversion of raw tag objects to the measurements resource.