| title | dataspice |
|---|---|
| author | Mindy Marshall |
| date | `r Sys.Date()` |
| output | html_document |
| runtime | shiny |
install.packages("dataspice")
library(dataspice)
dir.create("data", showWarnings = FALSE)
create_spice(dir = "data")
edit_creators()
edit_access()
Provide high-level information about your dataset, including title, description, license, and spatial/temporal coverage.
edit_biblio()
edit_attributes()
Now that all our metadata files are complete, we can compile it all into a structured dataspice.json file in our data/metadata/ folder.
write_spice()
install.packages(c("jsonlite", "listviewer", "here", "magrittr", "pkgdown"))
library(jsonlite) library(listviewer) library(here) library(magrittr) library(pkgdown)
jsonlite::read_json(here::here("data", "metadata", "dataspice.json")) %>% listviewer::jsonedit()
dataspice::build_site(path = "data/metadata/dataspice.json", template_path = system.file("template.html5", package = "dataspice"), out_path = "docs/index.html" )
Finally, we can use the dataspice.json file we just created to produce an informative README web page to include with our dataset for humans to enjoy! 🤩
We use function dataspice::build_site() which creates file index.html in the docs/ folder of your project (which it creates if it doesn’t already exist).
getwd() dataspice::build_site(path = "/data/metadata/dataspice.json", template_path = system.file("template.html5", package = "dataspice"), out_path = "docs/index.html" )
