File tree Expand file tree Collapse file tree
server/preprocessing/other-scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ services:
236236 LANG : " en_US.UTF-8"
237237 RENV_PATHS_CACHE : /renv/cache
238238 PYTHONIOENCODING : " utf-8"
239+ R_ALTMETRIC_APIKEY : " ${R_ALTMETRIC_APIKEY}"
239240 restart : unless-stopped
240241 volumes :
241242 - ./local_dev/renv/cache:/renv/cache
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ library("plyr")
44
55mlog <- getLogger(" metrics" )
66
7+ apikey_altmetric <- Sys.getenv(" R_ALTMETRIC_APIKEY" )
78
89enrich_metadata_metrics <- function (metadata , metrics_sources = c(" altmetric" , " crossref" )) {
910 start.time <- Sys.time()
@@ -36,7 +37,7 @@ get_altmetrics <- function(dois) {
3637 for (doi in valid_dois ) {
3738 tryCatch(
3839 {
39- metrics <- altmetric_data(altmetrics(doi = doi , apikey = " " ))
40+ metrics <- altmetric_data(altmetrics(doi = doi , apikey = apikey_altmetric ))
4041 results <- rbind.fill(results , metrics )
4142 },
4243 error = function (err ) {
You can’t perform that action at this time.
0 commit comments