pkgdown/analytics.html Skip to contents

Transforms a GeoLocator Data Package (GLDP) to a Darwin Core occurrence table. The resulting CSV files can be uploaded to an IPT for publication to GBIF. Archive descriptors are configured separately. See gldp_to_eml() to create an eml.xml file.

Usage

gldp_to_dwc(pkg, directory, scientific_name_ids = NULL)

Arguments

pkg

A GeoLocator Data Package object.

directory

Path to local directory to write file(s) to. If NULL, then a data frame is returned instead, which can be useful for extending/adapting the Darwin Core mapping before writing with readr::write_csv().

scientific_name_ids

Optional data frame with unique scientific_name and scientificNameID columns. By default, identifiers are left blank and no taxonomic lookup is performed. Supply identifiers explicitly when the publication service supports them.

Value

occurrence.csv file written to disk. Invisibly, an occurrence data frame.

Transformation details

Data are transformed into an Occurrence core. This transformation requires four resources:

  • tags: metadata about the device and deployment

  • observations: sex, age class and comments recorded for the bird

  • staps: stationary periods with temporal information

  • paths: spatial positions estimated for each stationary period

pressurepaths is used for elevations when present.

The following terms are set from normalized package metadata (sourced from top-level package fields):

  • datasetName: Package title.

  • datasetID: Package identifier (DOI/ID).

  • rightsHolder: Rights holder as provided in contributors (contributor with "rightsHolder" role). If no rightsHolder role is found, this field will be NA.

  • license: License name.

Key features of the Darwin Core transformation:

  • Stationary periods (staps) are treated as events, with each position as an occurrence representing the bird's location during that period.

  • Each occurrence represents one stationary period from the most_likely path reconstruction.

  • The eventDate is expressed as an ISO 8601 interval (start/end) representing the duration of the stationary period.

  • basisOfRecord is set to "MachineObservation" as data are derived from automated geolocator sensors.

  • samplingProtocol is set to "geolocator".

  • geodeticDatum is "EPSG:4326" (WGS84).

  • scientificName is taken from tags$scientific_name.

  • organismID is set to ring_number to track individual birds across multiple observations and deployments.

  • organismName is set to ring_number as the available label for the tracked individual.

  • occurrenceID combines ring_number, tag_id, and stap_id.

  • occurrenceStatus is set to "present".

  • sex, lifeStage, and eventRemarks are taken from the tag's observations, each matched to the stationary period that contains it or, failing that, to the nearest one within 14 days.

  • sex uses the Darwin Core vocabulary: EURING "M" and "F" become "male" and "female"; "U" (unknown) is left empty.

  • lifeStage uses the GBIF LifeStage vocabulary: EURING age classes "1" (pullus) and "3" (first-year) become "juvenile", and classes "4" (after first-year) to "H" become "adult". Classes "0" (unknown) and "2" (full-grown, year of hatching unknown) are left empty. The EURING code itself is kept as euringAgeClass in dynamicProperties.

  • minimumElevationInMeters and maximumElevationInMeters are estimated from pressurepaths$altitude when available.

  • Reconstructed-location uncertainty uses the 95th percentile of distances from the most_likely position with at least 100 finite simulations, or the maximum distance with fewer simulations. The grid-cell radius is a minimum; without simulations uncertainty is left empty. The 100-simulation threshold is a practical convention, not a GBIF requirement. For known locations, uncertainty is the radius enclosing the analysis grid cell, using params$tag_set_map$scale or an ERA5 default resolution of 0.25 degrees when parameters are absent.

See also

gldp_to_eml() to create the matching eml.xml metadata file.