From 3dd4d18469eff73634a4f25e8036881f910171e6 Mon Sep 17 00:00:00 2001 From: rhijmans Date: Mon, 29 Apr 2024 03:20:24 -0700 Subject: [PATCH] m --- source/_R/done.rmd | 15 ++++++++++----- source/contributors.rst | 1 - 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/source/_R/done.rmd b/source/_R/done.rmd index e979b4a..ccda7e2 100644 --- a/source/_R/done.rmd +++ b/source/_R/done.rmd @@ -13,20 +13,25 @@ fdone <- list.files(file.path(carob_path, "data", "compiled"), pattern="_metadat x <- do.call(carobiner::bindr, lapply(fdone, read.csv)) url <- gsub("doi:", "https://doi.org/", x$uri) url <- gsub("hdl:", "https://hdl.handle.net/", url) + +suri <- sapply(x$uri, carobiner::simple_uri) +github <- paste0("https://github.com/reagro/carob/blob/master/scripts/", x$group, "/", suri, ".R") +script <- paste0('R script') + rep <- paste0("http://carob-data.org/reports/", x$group, "/", x$dataset_id, ".html") frep <- basename(list.files(file.path(carob_path, "data", "clean"), pattern="html$", recursive = TRUE)) i <- x$dataset_id %in% gsub(".html", "", frep) -x$links <- paste0(x$group, - ifelse(i, paste0('
report'), ""), "") -# '
source') +#x$links <- paste0(x$group, +# ifelse(i, paste0('
report'), ""), "") +## '
source') #i <- unlist(gregexpr("doi:|hdl:", x$data_citation)) cit <- do.call(rbind, strsplit(x$data_citation, "doi:|hdl:")) cit <- data.frame(cit, url, x$uri) x$citation <- apply(cit, 1, \(i) paste0(i[1], '', i[4], '')) -x$dataset <- paste0(x$citation, " [", x$group, "] ") -x$dataset <- ifelse(i, paste0(x$dataset, 'Report'), x$dataset) +x$dataset <- paste0(x$citation, " [", x$group, "] ", script) +x$dataset <- ifelse(i, paste0(x$dataset, ', Report'), x$dataset) ``` diff --git a/source/contributors.rst b/source/contributors.rst index cfe44b1..90b0a35 100644 --- a/source/contributors.rst +++ b/source/contributors.rst @@ -5,4 +5,3 @@ Here is a table with the names of *Carob* contributors and the number of dataset .. raw:: html :file: _R/contributors.html -