Assess the FAIRness of the data and code shared in articles (rtransparent)
Source:R/assess_data_code.R
assess_data_code.RdBridges rtransparent and rfair: takes the data/code identifiers
rtransparent extracts from articles (its open_data_links and
open_code_links columns) and scores each against the FAIR metrics. Data
identifiers are scored with the FsF data metrics and code repositories with
the FRSM software metrics.
Usage
assess_data_code(
x,
id_col = NULL,
data_metric_version = "0.8",
code_metric_version = "0.7_software",
data_col = "open_data_links",
code_col = "open_code_links",
sep = " ; ",
quiet = FALSE,
workers = 1L,
keep = FALSE,
previous = NULL,
...
)Arguments
- x
One of: a data frame from
rtransparent::rt_data_code_pmc()/rt_all_pmc()(withopen_data_links/open_code_linkscolumns); a named list with those elements; or a character vector of" ; "-joined data-link strings.- id_col
Optional name of a column in
xidentifying the source article (e.g."pmid"or"doi"); used to label each result.- data_metric_version
Metric version for data identifiers (default
"0.8").- code_metric_version
Metric version for code repositories (default
"0.7_software").- data_col, code_col
Column/element names holding the joined links (defaults match rtransparent:
"open_data_links","open_code_links").- sep
Separator rtransparent uses to join identifiers (default
" ; ").- quiet
If
FALSE(default), print per-identifier progress.- workers, keep
See
assess_fair_batch(). Withkeep = TRUEthe"assessments"attribute holds the objects for data and code together.- previous
Optional result of an earlier
assess_data_code()call, to resume an interrupted run (seeassess_fair_batch()).- ...
Passed to
assess_fair().
Value
A data frame with one row per (article, kind, identifier): source
(article id), kind ("data" or "code"), and the columns of
assess_fair_batch(). Each unique identifier is assessed once.
Examples
# \donttest{
assess_data_code(list(open_data_links = "https://doi.org/10.5281/zenodo.8347772",
open_code_links = "https://github.com/pangaea-data-publisher/fuji"))
#> [1/1] assessing https://doi.org/10.5281/zenodo.8347772
#> [1/1] assessing https://github.com/pangaea-data-publisher/fuji
#> source kind identifier metric_version
#> 1 <NA> data https://doi.org/10.5281/zenodo.8347772 0.8
#> 2 <NA> code https://github.com/pangaea-data-publisher/fuji 0.7_software
#> scheme is_persistent resolved http_status
#> 1 doi TRUE TRUE 200
#> 2 url FALSE TRUE 200
#> resolved_url fair_percent F A I
#> 1 https://zenodo.org/records/8347772 88.46 100 100 66.67
#> 2 https://github.com/pangaea-data-publisher/fuji 91.11 95 100 100.00
#> R maturity n_pass n_metrics error
#> 1 83.33 2.5 15 17 <NA>
#> 2 81.25 2.5 17 17 <NA>
# }