Closed amoeba closed 3 years ago
We talked about doing this but I don't think we ever got around to implementing it(?) IIRC dataspice
currently implements EML->dataspice but not the reverse. @annakrystalli would know better than I though
I have a not-perfect but pretty-good dataspice->EML conversion set up going. Workflow is:
spice <- read_spice(...)
eml_doc <- as_eml(spice) # Followed by an EML::write_eml if you want XML
This produces a probably invalid EML record because of terms that don't easily crosswalk to EML without me writing tons of parsing logic. The biggest issue is that schema.org/distribution and schema.org/variableMeasured don't map well to EML because schema.org has us enter variables at the dataset level where EML associates variables with dataTable
elements. To make this less painful, I've provided a warning indicating this and a a crosswalk_variables
function to start the user off building an EML attributes table.
A colleague wanted to convert their dataspice to an EML 2.1.1 XML doc today but we couldn't figure it out without a few lines of code:
Do we have this already in dataspice and I just missed it? If not, would it be reasonable and useful to have a function to do this? We could include
emld
as a soft dependency and wrap the above code (or similar) in a single function.