View source: R/lib_data_loader.R
| load_provenance | R Documentation |
Reads a data_provenance.json file describing a project's pinned data
source: the CKAN endpoint, resource name pattern, expected SHA256,
Wayback snapshot, schema, and synthetic-data recipe.
load_provenance(path)
path |
Path to the provenance JSON file. |
The parsed provenance as a nested list (via
jsonlite::fromJSON() with simplifyVector = FALSE), or NULL if
the file does not exist.
prov_file <- tempfile(fileext = ".json")
writeLines('{"dataset": {"title": "demo"}, "sha256": "abc"}', prov_file)
prov <- load_provenance(prov_file)
prov$dataset$title
load_provenance(file.path(tempdir(), "no-such-file.json")) # NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.