Skip to contents

Transforms data from a Camera Trap Data Package to Darwin Core. The resulting CSV file(s) can be uploaded to an IPT for publication to GBIF. A meta.xml file is not created. See write_eml() to create an eml.xml file.

Usage

write_dwc(package, directory = ".")

Arguments

package

A Camtrap DP, as read by read_camtrap_dp().

directory

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

Value

CSV file(s) written to disk or list of data frames when directory = NULL.

Transformation details

Data are transformed into an Occurrence core and Audubon Media Description extension. This follows recommendations discussed and created by Peter Desmet, John Wieczorek, Lien Reyserhove, Ben Norton and others. See the SQL file(s) used by this function for details.

The following terms are set from the package metadata:

  • datasetName: Title as provided in package$title.

  • datasetID: Identifier as provided in package$id. Can be a DOI.

  • rightsHolder: Rights holder as provided in package$rightsHolder.

  • collectionCode: Platform name as provided in package$platform$title.

  • license: License with scope data as provided in package$licenses.

  • rights for media files: License with scope media as provided in package$licenses.

  • dwc:dataGeneralizations: "coordinates rounded to package$coordinatePrecision degrees".

  • coordinatePrecision: package$coordinatePrecision (e.g. 0.001).

Key features of the Darwin Core transformation:

  • Deployments (of camera traps) are parent events, with observations (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 parentEventID shared by all occurrences in a deployment.

  • Sequence-based observations share an eventID per sequence, image-based observations share an eventID per image.

  • The image(s) an observation is based on are provided in the Audubon Media Description extension, with a foreign key to the observation.

  • Excluded are records that document blank or unclassified media, vehicles and observations of humans.

See also

Other publication functions: round_coordinates(), write_eml()