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.

oarg_decode(oaire = NULL, limit = NULL, records_path = NULL, verbose = TRUE)

Arguments

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

Value

Exports de-compressed XML-formatted record, storing them locally as zip files. The file name represents the record identifier.

Details

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.

Examples

if (FALSE) { 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/") }