Describes any source datasets used in the creation of the derived dataset being described. Explicitly listing the DOIs and/or URLs of input data help future users understand in greater detail how the derived data were created and may some day be able to assign attribution to the creators of referenced datasets.

template_provenance(
  path = NULL,
  empty = TRUE,
  write.file = TRUE,
  return.obj = FALSE
)

Arguments

path

(character) Path to the metadata template directory.

empty

(logical) Whether to write an empty template file. Default is TRUE.

write.file

(logical; optional) Whether to write the template file. Default is TRUE.

return.obj

(logical; optional) Whether to return the provenance template as a data frame. Default is FALSE.

Value

provenance

Columns:

  • dataPackageID: Data package identifier. Supplying a valid packageID and systemID (of supported systems) is all that is needed to create a complete provenance record.

  • systemID: System (i.e. data repository) identifier. Currently supported systems are: EDI (Environmental Data Initiative).

  • url: URL linking to an online source (i.e. data, paper, etc.). Required when a source can't be defined by a packageID and systemID.

  • onlineDescription: Description of the data source. Required when a source can't be defined by a packageID and systemID.

  • title: The source title. Required when a source can't be defined by a packageID and systemID.

  • givenName: A creator or contacts given name. Required when a source can't be defined by a packageID and systemID.

  • middleInitial: A creator or contacts middle initial. Required when a source can't be defined by a packageID and systemID.

  • surName: A creator or contacts middle initial. Required when a source can't be defined by a packageID and systemID.

  • role: "creator" and "contact" of the data source. Required when a source can't be defined by a packageID and systemID. Add both the creator and contact as separate rows within the template, where the information in each row is duplicated except for the givenName, middleInitial, surName (or organizationName), and role fields.

  • organizationName: Name of organization the creator or contact belongs to. Required when a source can't be defined by a packageID and systemID.

  • email: Email of the creator or contact. Required when a source can't be defined by a packageID and systemID.

This table has a "long" (i.e. name-value) format accomodating multiple contacts and creators within a single provenance record.

Examples

if (FALSE) {
# Set working directory
setwd("/Users/me/Documents/data_packages/pkg_260")

# For an empty template to be filled manually
template_provenance(path = "./metadata_templates")
}