This function adds data from the Swiss Ornithological Institute (SOI) to a package. It includes tags, measurements, and observations based on the provided data frame and directory of data. The function also handles missing directories and updates the package accordingly.
See an example of use with this tutorial.
Arguments
- pkg
The package object to which the data will be added.
- gdl
A data frame containing the SOI data. Must include columns like
OrderName
,GDL_ID
, and other relevant fields for tags, measurements, and observations. Seeread_gdl
for more information.- directory_data
A character string specifying the path to the directory where data files are located. This directory is used to locate and match GDL_IDs to their corresponding directories.
- generate_observations
A logical value indicating whether to create pre-filled observations with missing values (date, locations, etc... assuming equipment and retrieval.
Details
The function performs the following steps:
Checks and retrieves the directory information for each GDL_ID/tag_id.
Creates GeoPressureR tag data for each of them when possible
Extract measurements and add them as resources to pkg
Compute tags.csv and observations.csv from
gdl
and add them as resources too.