write_dwc {camtrapdp} | R Documentation |
Transform a Camera Trap Data Package to a Darwin Core Archive
Description
Transforms a Camera Trap Data Package object to a Darwin Core Archive.
Usage
write_dwc(x, directory)
Arguments
x |
Camera Trap Data Package object, as returned by |
directory |
Path to local directory to write files to. |
Value
CSV and meta.xml
files written to disk.
And invisibly, a list of data frames with the transformed data.
Transformation details
This function follows recommendations in Reyserhove et al. (2023) doi:10.35035/doc-0qzp-2x37 and transform data to:
An Occurrence core.
A
meta.xml
file.
Key features of the Darwin Core transformation:
The Occurrence core contains one row per observation (
dwc:occurrenceID = observationID
).Only observations with
observationType = "animal"
andobservationLevel = "event"
are included, thus excluding observations that are (of) humans, vehicles, blanks, unknowns, unclassified and media-based.Deployment information is included in the Occurrence core, such as location, habitat,
dwc:samplingProtocol
, deployment duration indwc:samplingEffort
anddwc:parentEventID = deploymentID
as grouping identifier.Event information is included in the Occurrence core, as event duration in
dwc:eventDate
anddwc:eventID = eventID
as grouping identifier.Media files are included in the Audubon/Audiovisual Media Description extension, with a foreign key to the observation. A media file that is used for more than one observation is repeated.
Metadata is used to set the following record-level terms:
-
dwc:datasetID = id
. -
dwc:datasetName = title
. -
dwc:collectionCode
: first source insources
. -
dcterms:license
: license (name
) inlicenses
with scopedata
. The license (name
) with scopemedia
is used asdcterms:rights
in the Audubon Media Description extension. -
dcterms:rightsHolder
: first contributor incontributors
with rolerightsHolder
. -
dwc:dataGeneralizations
: set ifcoordinatePrecision
is defined.
-
Examples
x <- example_dataset()
write_dwc(x, directory = "my_directory")
# Clean up (don't do this if you want to keep your files)
unlink("my_directory", recursive = TRUE)