A Darwin Core archive is a zip file containing a combination of
data and metadata. build_archive() constructs this zip file in the parent
directory. The function assumes that all necessary files have been
pre-constructed, and can be found inside the "data-publish" directory
with no additional or redundant information. Structurally, build_archive()
is similar to devtools::build(), in the sense that it takes a repository
and wraps it for publication.
Value
Doesn't return anything; 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 data-publish
directory:
Data
One or more csv files named
occurrences.csv,events.csvand/ormultimedia.csv. These csv files contain data standardised using Darwin Core Standard (seecorella::corella-package()for details). Adata.frame/tibblecan be added to the correct folder usinguse_data().Metadata
A metadata statement in
EMLformat with the file nameeml.xml. Completed metadata statements written markdown as.Rmdorqmdfiles can be converted and saved to the correct folder usinguse_metadata(). Create a new template withuse_metadata_template().Schema
A 'schema' document in xml format with the file name
meta.xml.build_archive()will detect whether this file is present and build a schema file if missing. This file can also be constructed separately usinguse_schema().
