Skip to contents

Creates a standardized data origin documentation file in CSV format, containing essential metadata about a dataset's source, format, and usage rights.

Usage

create_data_origin(file_path, return = FALSE, force = FALSE)

Arguments

file_path

Character string. Path where the CSV file should be saved.

return

Logical. If TRUE, returns the data frame in addition to saving. Default is FALSE.

force

Logical. If TRUE, overwrites existing file at path. Default is FALSE.

Value

If return=TRUE, returns a data frame containing the data origin template. Otherwise returns invisible(NULL).

Details

Generates a template with the following metadata fields:

  • Resource name

  • Data source (URL/DOI)

  • Sampling frame (language, modality, genre)

  • Collection dates

  • Data format

  • Schema description

  • License information

  • Attribution requirements

Examples

tmp_file <- tempfile(fileext = ".csv")
create_data_origin(tmp_file)
#> Data origin file created at `file_path`.
read.csv(tmp_file)
#>                 attribute
#> 1           Resource name
#> 2             Data source
#> 3     Data sampling frame
#> 4 Data collection date(s)
#> 5             Data format
#> 6             Data schema
#> 7                 License
#> 8             Attribution
#>                                                 description
#> 1                                 The name of the resource.
#> 2                                            URL, DOI, etc.
#> 3         Language, language variety, modality, genre, etc.
#> 4                         The dates the data was collected.
#> 5                             .txt, .csv, .xml, .html, etc.
#> 6 Relationships between data elements: files, folders, etc.
#> 7                                     CC BY, CC BY-SA, etc.
#> 8                                     Citation information.