Transforms a European Tracking Network (ETN) dataset to a Darwin Core Archive.
Usage
write_dwc(
package,
directory,
dataset_id = NULL,
dataset_name = NULL,
license = c("CC-BY-4.0", "CC0-1.0"),
rights_holder = NULL
)Arguments
- package
A Frictionless Data Package of ETN data, as returned by
read_package(). It is expected to contain the resourcesanimals,tags,detectionsanddeployments.- directory
Path to local directory to write files to.
- dataset_id
Identifier for the dataset.
- dataset_name
Title of the dataset.
- license
License of the dataset.
- rights_holder
Acronym of the organization owning or managing the rights over the data.
Value
CSV and meta.xml files written to disk.
And invisibly, a list of data frames with the transformed data.
Details
The resulting files can be uploaded to an IPT for
publication to GBIF and/or OBIS.
A corresponding eml.xml metadata file is not created.
Transformation details
This function follows recommendations discussed and created by Peter Desmet, Jonas Mortelmans, Jonathan Pye, John Wieczorek and others and transforms data to:
An Occurrence core.
Key features of the Darwin Core transformation:
Deployments (animal+tag associations) are parent events, with capture, surgery, release, recapture (human observations) and acoustic detections (machine observations) as child events. No information about the parent event is provided other than its ID, meaning that data can be expressed in an Occurrence Core with one row per observation and
parentEventIDshared by all occurrences in a deployment.The release event often contains metadata about the animal (sex, life stage, comments) and deployment as a whole.
Acoustic detections are downsampled to the first detection per hour, to reduce the size of high-frequency data. The
coordinateUncertaintyInMetersis set to 1000 m to account for imprecise receiver location and acoustic detection range. Duplicate detections (same animal, tag and timestamp) are excluded. It is possible for a deployment to contain no detections, e.g. if the tag malfunctioned right after deployment.Parameters or metadata are used to set the following record-level terms:
dwc:datasetID:dataset_id.dwc:datasetName:dataset_name.dcterms:license:license.dcterms:rightsHolder:rights_holder.
Examples
package <- example_dataset()
write_dwc(
package,
directory = "my_directory",
dataset_id = "https://doi.org/10.14284/432",
dataset_name = paste(
"2014_DEMER - Acoustic telemetry data for four fish species in the",
"Demer river (Belgium)"
),
license = "CC0-1.0",
rights_holder = "INBO"
)
#>
#> ── Reading data ──
#>
#> ── Transforming data to Darwin Core ──
#>
#> ── Writing files ──
#>
#> • my_directory/occurrence.csv
#> • my_directory/meta.xml
# Clean up (don't do this if you want to keep your files)
unlink("my_directory", recursive = TRUE)
