View source: R/build_archive.R
build_archive | R Documentation |
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.
build_archive(file = "dwc-archive.zip", overwrite = FALSE, quiet = FALSE)
file |
The name of the file to be built in the parent directory.
Should end in |
overwrite |
(logical) Should existing files be overwritten? Defaults to
|
quiet |
(logical) Whether to suppress messages about what is happening.
Default is set to |
This function looks for three types of objects in the data-publish
directory:
Data
One or more csv files named occurrences.csv
, events.csv
and/or
multimedia.csv
.
These csv files contain data standardised using Darwin Core Standard
(see corella::corella-package()
for details). A data.frame
/tibble
can be added to the correct folder using use_data()
.
Metadata
A metadata statement in EML
format with the file name eml.xml
.
Completed metadata statements written markdown as .Rmd
or qmd
files
can be converted and saved to the correct folder using use_metadata()
.
Create a new template with use_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 using use_schema()
.
Doesn't return anything; called for the side-effect of building a 'Darwin Core Archive' (i.e. a zip file).
use_data()
, use_metadata()
, use_schema()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.