fetch_record_metadata: Get and load SAFE dataset metadata

View source: R/metadata.R

fetch_record_metadataR Documentation

Get and load SAFE dataset metadata

Description

Internal handlers to i) ensure there are local copies of record metadata, fetching it from the SAFE project website if needed and ii) load that data from file.

Usage

fetch_record_metadata(record_set)

load_record_metadata(record_set)

Arguments

record_set

An object of class safe_record_set.

Details

This is the same metadata used to populate the Zenodo description but is downloaded as JSON format and stored within the record directory in the SAFE data directory for reuse.

Value

The fetch_record_metadata function invisibly returns a logical value indicating if all records were fetched successfully and load_record_metadata returns a list object containing record metadata

Functions

  • fetch_record_metadata(): Download and store JSON metadata for a record

  • load_record_metadata(): Load JSON metadata for a record

Examples

   
     
     rec <- validate_record_ids(1400562)
     safedata:::fetch_record_metadata(rec)
     metadata <- safedata:::load_record_metadata(rec)
     
   

ImperialCollegeLondon/safe_data documentation built on Jan. 27, 2024, 9:51 a.m.