Skip to content

Commit 0686c02

Browse files
committed
added e-mail from ENV for crossref API nice pool
1 parent 67c90bb commit 0686c02

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

server/preprocessing/other-scripts/metrics.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ library("plyr")
55
mlog <- getLogger("metrics")
66

77
apikey_altmetric <- Sys.getenv("R_ALTMETRIC_APIKEY")
8+
email_crossref <- Sys.getenv("R_CROSSREF_APIMAIL")
89

910
enrich_metadata_metrics <- function(metadata, metrics_sources=c("altmetric", "crossref")) {
1011
start.time <- Sys.time()
@@ -99,7 +100,7 @@ add_citations <- function(metadata) {
99100
cc_list <- list()
100101
for (doi in valid_dois) {
101102
tryCatch({
102-
count <- cr_citation_count(doi = doi)
103+
count <- cr_citation_count(doi = doi, key = email_crossref)
103104
cc_list <- append(cc_list, list(count))
104105
}, error = function(err) {
105106
mlog$debug(gsub("[\r\n]", "", paste(err, doi, sep = " ")))

0 commit comments

Comments
 (0)