You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.Rmd
+1-1
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The goal of `dataspice` is to make it easier for researchers to create basic, li
28
28
- Create a helpful dataset README webpage for your data similar to how [pkgdown](https://pkgdown.r-lib.org/) creates websites for R packages.
29
29
- Produce more complex metadata formats for richer description of your datasets and to aid dataset discovery.
30
30
31
-
Metadata fields are based on [Schema.org/Dataset](http://schema.org/Dataset) and other [metadata standards](https://github.com/ropenscilabs/dataspice#resources) and represent a lowest common denominator which means converting between formats should be relatively straightforward.
31
+
Metadata fields are based on [Schema.org/Dataset](https://schema.org/Dataset) and other [metadata standards](https://github.com/ropenscilabs/dataspice#resources) and represent a lowest common denominator which means converting between formats should be relatively straightforward.
| NA | Jeanette Clark | National Center for Ecological Analysis and Synthesis |<[email protected]>|
276
+
| NA | Rich,Brenner | Alaska Department of Fish and Game | richard.brenner.alaska.gov |
267
277
268
278
### Save JSON-LD file
269
279
@@ -297,34 +307,38 @@ compatibility with terms from [Schema.org](https://schema.org). However,
297
307
`dataspice` will do its best to convert your `dataspice` metadata to
298
308
EML:
299
309
300
-
library(dataspice)
310
+
```r
311
+
library(dataspice)
301
312
302
-
# Load an example dataspice JSON that comes installed with the package
303
-
spice <- system.file(
304
-
"examples", "annual-escapement.json",
305
-
package = "dataspice")
313
+
# Load an example dataspice JSON that comes installed with the package
314
+
spice<- system.file(
315
+
"examples", "annual-escapement.json",
316
+
package="dataspice")
306
317
307
-
# Convert it to EML
308
-
eml_doc <- spice_to_eml(spice)
309
-
#> Warning: variableMeasured not crosswalked to EML because we don't have enough
310
-
#> information. Use `crosswalk_variables` to create the start of an EML attributes
311
-
#> table. See ?crosswalk_variables for help.
312
-
#> You might want to run EML::eml_validate on the result at this point and fix what validations errors are produced.You will commonly need to set `packageId`, `system`, and provide `attributeList` elements for each `dataTable`.
318
+
# Convert it to EML
319
+
eml_doc<- spice_to_eml(spice)
320
+
#> Warning: variableMeasured not crosswalked to EML because we don't have enough
321
+
#> information. Use `crosswalk_variables` to create the start of an EML attributes
322
+
#> table. See ?crosswalk_variables for help.
323
+
#> You might want to run EML::eml_validate on the result at this point and fix what validations errors are produced.You will commonly need to set `packageId`, `system`, and provide `attributeList` elements for each `dataTable`.
324
+
```
313
325
314
326
You may receive warnings depending on which `dataspice` fields you
315
327
filled in and this process will very likely produce an invalid EML
316
328
record which is totally fine:
317
329
318
-
library(EML)
330
+
```r
331
+
library(EML)
319
332
320
-
eml_validate(eml_doc)
321
-
#> [1] FALSE
322
-
#> attr(,"errors")
323
-
#> [1] "Element '{https://eml.ecoinformatics.org/eml-2.2.0}eml': The attribute 'packageId' is required but missing."
324
-
#> [2] "Element '{https://eml.ecoinformatics.org/eml-2.2.0}eml': The attribute 'system' is required but missing."
325
-
#> [3] "Element 'dataTable': Missing child element(s). Expected is one of ( physical, coverage, methods, additionalInfo, annotation, attributeList )."
326
-
#> [4] "Element 'dataTable': Missing child element(s). Expected is one of ( physical, coverage, methods, additionalInfo, annotation, attributeList )."
327
-
#> [5] "Element 'dataTable': Missing child element(s). Expected is one of ( physical, coverage, methods, additionalInfo, annotation, attributeList )."
333
+
eml_validate(eml_doc)
334
+
#> [1] FALSE
335
+
#> attr(,"errors")
336
+
#> [1] "Element '{https://eml.ecoinformatics.org/eml-2.2.0}eml': The attribute 'packageId' is required but missing."
337
+
#> [2] "Element '{https://eml.ecoinformatics.org/eml-2.2.0}eml': The attribute 'system' is required but missing."
338
+
#> [3] "Element 'dataTable': Missing child element(s). Expected is one of ( physical, coverage, methods, additionalInfo, annotation, attributeList )."
339
+
#> [4] "Element 'dataTable': Missing child element(s). Expected is one of ( physical, coverage, methods, additionalInfo, annotation, attributeList )."
340
+
#> [5] "Element 'dataTable': Missing child element(s). Expected is one of ( physical, coverage, methods, additionalInfo, annotation, attributeList )."
341
+
```
328
342
329
343
This is because some fields in `dataspice` store information in
330
344
different structures and because EML requires many fields that
0 commit comments