Convert a list of GeoPressureR tag objects into the long-format
measurements table used by GeoLocator Data Packages.
Usage
tags_to_measurements(tag_list, tags = lifecycle::deprecated())Value
A tibble::tibble() data frame with columns:
- tag_id
A character vector representing the unique identifier for each tag.
- sensor
A character vector representing the type of sensor measurement, including types like "activity", "mean_acceleration_z", "light", "temperature_external", etc.
- datetime
A POSIXct datetime object representing the timestamp of the measurements.
- value
A numeric vector containing the sensor measurement values.
- label
A character vector for additional labelling, which is NA if not present in the original data.
Details
The function extracts sensor tables from each tag, ensures a label column
is present, reshapes supported sensors into long format, and drops rows with
missing values.
The current conversion supports pressure, light, acceleration/activity,
temperature, and magnetic sensors. The temperature table of tags created
with GeoPressureR before 3.7.1 is read as temperature_external.
If no tags, or no sensor tables, are provided, the function returns an empty tibble with the appropriate column names and types.
See also
params_to_tags() and params_to_observations() for related
conversions used when building GeoLocator-DP resources from GeoPressureR
objects.
