Commit baa23f3c authored by jansen's avatar jansen
Browse files

update

parent f807aa50
No related merge requests found
Pipeline #7032 failed with stage
in 59 seconds
Showing with 11 additions and 26 deletions
+11 -26
......@@ -128,23 +128,8 @@ res
```{r retrieve, message=FALSE, warning=FALSE, results='hide'}
FUN <- function(id) {
if(!is.na(id)) {
df <- author_df(au_id = id, count = 100)
# prism:url" "dc:identifier" "eid" "dc:title" "dc:creator"
# "prism:publicationName" "prism:issn" "prism:eIssn" "prism:volume" "prism:issueIdentifier" "prism:pageRange"
# "prism:coverDate" "prism:coverDisplayDate" "prism:doi" "pii" "dc:description" "citedby-count
# "prism:aggregationType" "subtype" "subtypeDescription" "author-count.@limit" "author-count.@total" "author-count.$"
# "authkeywords" "source-id" "fund-acr" "fund-no" "fund-sponsor" "openaccess"
# "openaccessFlag" "freetoread.value.$" "freetoreadLabel.value.$" "entry_number" "article-number" "pubmed-id"
out <- df[, c('dc:creator', 'prism:publicationName', 'prism:issn', 'prism:eIssn', 'prism:volume', 'prism:issueIdentifier', 'prism:pageRange', 'prism:coverDate', 'prism:doi', 'citedby-count')]
out$id <- id
return(out)
}
}
suppressMessages(
scopus.list <- sapply(res$SCOPUS, function(x) FUN(x))
)
library(plyr)
sc.df <- rbind.fill(sapply(res$SCOPUS, function(x) author_df(au_id = x, count = 100)))
```
### Filter by year
......@@ -153,12 +138,13 @@ Bitte das gewünschte Jahr eintragen.
```{r byYear}
year <- 2020
scopus.year <- lapply(scopus.list, function(x) x <- x[grepl(year, x$`prism:coverDate`), ])
scopus.year <- sc.df[grepl(year, sc.df$`prism:coverDate`), ]
```
## Researcher performance
```{r, overallCitations}
res$ScopusCitations <- sapply(scopus.list, function(x) sum(as.numeric(x$'citedby-count')))
author.cit <- tapply(as.numeric(sc.df$`citedby-count`), sc.df$au_id, sum)
res$ScopusCitations <- author.cit[match(res$SCOPUS, names(author.cit))]
```
......@@ -166,10 +152,8 @@ res$ScopusCitations <- sapply(scopus.list, function(x) sum(as.numeric(x$'citedby
Publikationen zählen nur einmal pro AG.
```{r}
## no duplicates in AG
ag.list <- tapply(scopus.year, res$AG, function(x) do.call('rbind', x))
ag.list <- lapply(ag.list, function(x) x <- x[!duplicated(x$`prism:doi`), ])
result <- do.call('rbind', ag.list)
result$AG <- res$AG[match(result$id, res$SCOPUS)]
sc.df$AG <- res$AG[match(sc.df$au_id, res$SCOPUS)]
sc.df$Duplicates <- duplicated(sc.df$`dc:identifier`, sc.df$AG)
```
# Ergebnisse
......@@ -180,17 +164,17 @@ Es geht aber natürlich auch gleich im Script:
```{r}
### Zahl der Publikationen pro AG
table(result$AG)
table(sc.df$AG[!sc.df$Duplicates])
```
```{r}
# Zahl der Zitationen pro AG
tapply(as.numeric(result$`citedby-count`), result$AG, sum)
tapply(as.numeric(sc.df$`citedby-count`[!sc.df$Duplicates]), sc.df$AG[!sc.df$Duplicates], sum)
```
```{r writeResults}
write.xlsx(result, 'Zitationsanalyse_AUF_AGs.xlsx')
write.xlsx(sc.df, 'Zitationsanalyse_AUF_AGs.xlsx')
write.xlsx(res, 'Zitationsanalyse_AUF_Forschende.xlsx')
```
......
No preview for this file type
No preview for this file type
......@@ -2,3 +2,4 @@ base
rscopus
rorcid
openxlsx
plyr
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment