Description Usage Arguments Details Value Examples
OpenAIRE Research Graph files are json-files that contain a record identifier and a BASE64 encoded text string representing the metadata. This function decodes these strings and saves them locally.
1 | oarg_decode(oaire = NULL, limit = NULL, records_path = NULL, verbose = TRUE)
|
oaire |
compressed json file |
limit |
number of records to be decoded |
records_path |
directory for the xml files |
verbose |
print some information on what is going on |
De-coding and storing the records individually from an OpenAIRE Research Graph dump allows to process the records independent from each other, which is a common approach when working with big data.
Because the dumps are quite large, the function furthermore has a parameter that allows setting a limit, which is helpful for inspecting the output first.
By default, a progress bar presents the current state of the process.
Exports de-compressed XML-formatted record, storing them locally as zip files. The file name represents the record identifier.
1 2 3 4 5 6 7 8 9 | ## Not run:
library(jsonlite)
dump_file <- system.file("extdata", "", package = "openairegraph")
# a dump file is in json format
loaded_dump <- jsonlite::stream_in(file("dump_file"))
# writes out each XML-formatted record as a zip file to a specified folder
oaire_decode(loaded_dump, limit = 10, records_path = "data/")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.