A Darwin Core archive is a zip file with a specified combination of data
and metadata. This function assumes that all of these file types have been
pre-constructed, and can be found inside a single folder, with no additional
or redundant information. This function is similar to devtools::build()
,
in the sense that it takes a repository and wraps it for publication, It
differs from devtools::build()
in that it builds a Darwin Core Archive,
rather than an R package.
Value
Invisibly returns the location of the built zip file; but typically called for the side-effect of building a 'Darwin Core Archive' (i.e. a zip file).
Details
This function looks for three types of objects in the specified directory
:
One or more
csv
files such asoccurrences.csv
&/orevents.csv
. These will be manipulated versions of the raw dataset, which have been altered to use Darwin Core terms as column headers. Seecorella::corella-package()
for details.A metadata statement, stored in
EML
using the filenameeml.xml
. The functionuse_metadata()
is a good starting point here, followed bybuild_metadata()
once you have populated your metadata statement.A 'schema' document, also stored in xml, called
meta.xml
. This is usually constructed usingbuild_schema()
.
You will get an error if these files are not present. The resulting file shares the name of the working directory (with a .zip file extension), and is placed in the parent directory