Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
588 changes: 569 additions & 19 deletions README.md

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions data-raw/apply_datapapers_decisions.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Merge decisions exported from the review app (issue #28) into the committed
# screening sheet. Reads data-raw/datapapers_decisions.csv (doi, include,
# reason; produced by the Export button in datapapers_review.html) and fills
# include/reason in data-raw/datapapers_screening.csv for those DOIs.
#
# The decisions file is the reviewer's own choices, so it overwrites any
# earlier value for the same DOI; rows not in the decisions file are left
# untouched. Re-running is idempotent.
#
# Run from the package root:
# Rscript data-raw/apply_datapapers_decisions.R

library(dplyr)
library(readr)

decisions_path <- "data-raw/datapapers_decisions.csv"
screening_path <- "data-raw/datapapers_screening.csv"

if (!file.exists(decisions_path)) {
stop("Missing ", decisions_path, ". Export decisions from ",
"data-raw/datapapers_review.html first (Export CSV button) and save ",
"the download there.", call. = FALSE)
}

decisions <- read_csv(
decisions_path,
col_types = cols(doi = col_character(), include = col_logical(),
reason = col_character())
)
stopifnot(!any(duplicated(decisions$doi)), !any(is.na(decisions$include)))

screening <- read_csv(
screening_path,
col_types = cols(
doi = col_character(), title = col_character(), journal = col_character(),
published_year = col_integer(), auto_relevant = col_logical(),
include = col_logical(), reason = col_character()
)
)

unknown <- setdiff(decisions$doi, screening$doi)
if (length(unknown) > 0) {
stop(length(unknown), " decision DOI(s) not present in the screening sheet, ",
"first: ", unknown[1], call. = FALSE)
}

updated <- screening |>
left_join(decisions, by = "doi", suffix = c("", "_new")) |>
mutate(
include = coalesce(include_new, include),
reason = if_else(!is.na(include_new), reason_new, reason),
include_new = NULL, reason_new = NULL
)

write_csv(updated, screening_path, na = "")

message(nrow(decisions), " decisions applied to ", screening_path, ": now ",
sum(updated$include %in% TRUE), " included, ",
sum(updated$include %in% FALSE), " excluded, ",
sum(is.na(updated$include)), " pending.")
1 change: 1 addition & 0 deletions data-raw/datapapers_country_fixes.csv
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
doi,first_author_affiliation_country
10.46471/gigabyte.167,Cabo Verde
46 changes: 46 additions & 0 deletions data-raw/datapapers_decisions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
doi,include,reason
10.3390/data2030024,FALSE,
10.3390/data3040050,FALSE,
10.3390/data6080079,FALSE,
10.3390/data8060103,TRUE,
10.3390/data8030048,FALSE,
10.3390/data8090141,TRUE,
10.3390/data8110162,FALSE,
10.3390/data10100155,FALSE,
10.3390/data10040051,FALSE,
10.46471/gigabyte.167,TRUE,
10.1093/gigascience/gix101,FALSE,
10.1093/gigascience/giaa125,FALSE,
10.1093/gigascience/giae051,FALSE,
10.1038/sdata.2017.98,FALSE,
10.1038/sdata.2018.108,TRUE,
10.1038/s41597-019-0316-y,FALSE,
10.1038/s41597-020-00648-2,FALSE,
10.1038/s41597-020-0562-z,FALSE,
10.1038/s41597-020-0496-5,FALSE,
10.1038/s41597-020-0384-z,FALSE,
10.1038/s41597-020-00596-x,FALSE,
10.1038/s41597-021-01002-w,FALSE,
10.1038/s41597-021-00856-4,FALSE,
10.1038/s41597-022-01686-8,TRUE,
10.1038/s41597-022-01749-w,TRUE,
10.1038/s41597-022-01439-7,TRUE,
10.1038/s41597-022-01358-7,FALSE,
10.1038/s41597-022-01788-3,FALSE,
10.1038/s41597-023-02732-9,FALSE,
10.1038/s41597-023-01973-y,FALSE,
10.1038/s41597-023-02297-7,FALSE,
10.1038/s41597-023-02277-x,FALSE,
10.1038/s41597-024-03298-w,FALSE,
10.1038/s41597-024-03453-3,FALSE,
10.1038/s41597-023-02886-6,FALSE,
10.1038/s41597-024-03601-9,FALSE,
10.1038/s41597-025-06059-5,FALSE,
10.1038/s41597-025-05459-x,FALSE,
10.1038/s41597-025-05600-w,FALSE,
10.1038/s41597-025-06468-6,FALSE,
10.1038/s41597-025-05625-1,FALSE,
10.1038/s41597-025-04537-4,TRUE,
10.1038/s41597-025-05100-x,FALSE,
10.1038/s41597-026-06698-2,FALSE,
10.1038/s41597-026-07352-7,FALSE,
Loading
Loading