make_eml | R Documentation |
Render the contents of metadata templates into EML, validate, and write to file.
make_eml(
path,
data.path = path,
eml.path = path,
dataset.title = NULL,
temporal.coverage = NULL,
geographic.description = NULL,
geographic.coordinates = NULL,
maintenance.description = NULL,
data.table = NULL,
data.table.name = data.table,
data.table.description = NULL,
data.table.quote.character = NULL,
data.table.url = NULL,
other.entity = NULL,
other.entity.name = other.entity,
other.entity.description = NULL,
other.entity.url = NULL,
provenance = NULL,
user.id = NULL,
user.domain = NULL,
package.id = NULL,
write.file = TRUE,
return.obj = FALSE,
x = NULL
)
path |
(character) Path to the metadata template directory. |
data.path |
(character) Path to the data directory. |
eml.path |
(character) Path to the EML directory, where EML files are written. |
dataset.title |
(character) Title of the dataset. |
temporal.coverage |
(character) Beginning and ending dates of the dataset in the format
"YYYY-MM-DD" (e.g.
|
geographic.description |
(character) Description of datasets geographic extent. Don't use this argument if geographic coverage is supplied by geographic_coverage.txt. |
geographic.coordinates |
(character) Coordinates of datasets geographic extent. Coordinates are
listed in this order: North, East, South, West (e.g.
|
maintenance.description |
(character) A description of data collection status (e.g. "ongoing", "complete"), communicating the frequency of updates. |
data.table |
(character; optional) Table file name. If more than one, then supply
as a vector of character strings (e.g.
|
data.table.name |
(character; optional) A short descriptive name for the table. Defaults
to |
data.table.description |
(character; optional) Table description. If more than one, then supply
as a vector of character strings in the same order as listed in
|
data.table.quote.character |
(character; optional) Quote character used in |
data.table.url |
(character; optional) The publicly accessible URL from which
|
other.entity |
(character; optional) Name of |
other.entity.name |
(character; optional) A short descriptive name for the other.entity.
Defaults to |
other.entity.description |
(character; optional) Description(s) of |
other.entity.url |
(character; optional) The publicly accessible URL from which
|
provenance |
(character; optional) EDI Data Repository Data package ID(s)
corresponding to parent datasets from which this dataset was created
(e.g. |
user.id |
(character; optional) Repository user identifier. If more than one,
then enter as a vector of character strings (e.g.
|
user.domain |
(character; optional) Repository domain associated with
|
package.id |
(character; optional) Data package ID for the dataset described by this
EML. Ask your data repository for a package ID. Missing |
write.file |
(logical; optional) Whether to write the EML file. |
return.obj |
(logical; optional) Whether to return the EML as an R object of class |
x |
(named list; optional) Alternative input to
|
make_eml()
reads the contents of metadata templates,
auto-extracts additional metadata from the data entities, appends value
added content (e.g. resolving keywords to controlled vocabularies), and
adds all the metadata content to locations in the EML schema according
with best practice recommendations of scientists, data managers, and
data repositories. The EML is then validated against the schema and
written to file.
Character encodings in tabular metadata templates are converted to UTF-8
via enc2utf8()
. Characters in TextType metadata templates are not
yet converted. Note: This may lead to an inaccuracy and disconnect
between values in the data objects and what is reported in the EML (e.g.
a categorical variable listed in the EML may not be the same as it's
corresponding value in the data object). For this reason it's important
to work with UTF-8 encoded data and metadata.
EML file written to eml.path
.
EML object when return.obj = TRUE
.
## Not run:
# Set working directory
setwd("/Users/me/Documents/data_packages/pkg_260")
# For 2 tables and 2 other entities
make_eml(
path = "./metadata_templates",
data.path = "./data_objects",
eml.path = "./eml",
dataset.title = "Sphagnum and Vascular Plant Decomposition under Increasing Nitrogen Additions",
temporal.coverage = c("2014-05-01", "2015-10-31"),
maintenance.description = "Completed: No updates to these data are expected",
data.table = c("decomp.csv", "nitrogen.csv"),
data.table.description = c("Decomposition data", "Nitrogen data"),
other.entity = c("ancillary_data.zip", "processing_and_analysis.R"),
other.entity.description = c("Ancillary data", "Data processing and analysis script"),
user.id = "myid",
user.domain = "EDI",
package.id = "edi.260.1")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.