Mapping between Schema.Org and EML via JQ

We will use J-Query as XSLT-like stylesheets. These two examples shipping in this package are currently a work in progress:

library(jqr)
eml_to_schema <- readr::read_file(system.file("jq/eml_to_schema.jq", package="emld"))
schema_to_eml <-  readr::read_file(system.file("jq/schema_to_eml.jq", package="emld"))

Let's map a more complete EML document into schema.org:

eml <- readr::read_file("https://raw.githubusercontent.com/cboettig/emld/master/inst/extdata/hf205.json")
jq(eml, eml_to_schema)

Convert a dataset marked up in http://schema.org/Dataset terms into EML

schema <- readr::read_file("../inst/extdata/schema-org-dataset.json")

jq(schema, schema_to_eml)


cboettig/emld documentation built on Oct. 29, 2020, 3:46 p.m.