@@ -101,7 +101,7 @@ counts from OpenAlex.
101
101
issn <- "2475-9066"
102
102
joss_details <- rcrossref::cr_journals(issn, works = FALSE) %>%
103
103
pluck("data")
104
- joss_details$total_dois
104
+ (total_dois <- joss_details$total_dois)
105
105
106
106
## Pull down all records from Crossref
107
107
papers <- rcrossref::cr_journals(issn, works = TRUE, cursor = "*",
@@ -114,6 +114,11 @@ papers <- papers %>%
114
114
dim(papers)
115
115
dim(papers %>% distinct())
116
116
117
+ ## Check that all papers were pulled down and stop otherwise
118
+ if (!(nrow(papers %>% distinct()) >= total_dois)) {
119
+ stop("Not all papers were pulled down from Crossref!")
120
+ }
121
+
117
122
## A few papers don't have alternative.ids - generate them from the DOI
118
123
noaltid <- which(is.na(papers$alternative.id))
119
124
papers$alternative.id[noaltid] <- papers$doi[noaltid]
@@ -232,6 +237,10 @@ joss_api <- do.call(dplyr::bind_rows, lapply(joss_api, function(w) {
232
237
}))
233
238
dim(joss_api)
234
239
dim(joss_api %>% distinct())
240
+ ## Check that all papers were pulled down and stop otherwise
241
+ if (!(nrow(joss_api %>% distinct()) >= total_dois)) {
242
+ stop("Not all papers were pulled down from the JOSS API!")
243
+ }
235
244
joss_api$repo_url[duplicated(joss_api$repo_url)]
236
245
237
246
papers <- papers %>% dplyr::left_join(joss_api, by = c("alternative.id" = "doi"))
@@ -911,6 +920,8 @@ ggplot(papers %>%
911
920
Submissions associated with rOpenSci and pyOpenSci are not considered here,
912
921
since they are not explicitly reviewed at JOSS.
913
922
923
+ ## All time
924
+
914
925
``` {r most-reviewers, class.source = 'fold-hide', message = FALSE}
915
926
reviewers <- papers %>%
916
927
dplyr::filter(!grepl("rOpenSci|pyOpenSci", prerev_labels)) %>%
@@ -931,6 +942,52 @@ DT::datatable(
931
942
)
932
943
```
933
944
945
+ ## Past 5 years
946
+
947
+ ``` {r most-reviewers-past-5years, class.source = 'fold-hide', message = FALSE}
948
+ reviewers <- papers %>%
949
+ dplyr::filter(!grepl("rOpenSci|pyOpenSci", prerev_labels)) %>%
950
+ dplyr::mutate(year = year(published.date)) %>%
951
+ dplyr::filter(as.Date(published.date) >= (lubridate::today() - 5 * 365.25)) %>%
952
+ dplyr::select(reviewers, year) %>%
953
+ tidyr::separate_rows(reviewers, sep = ",")
954
+
955
+ ## Most active reviewers
956
+ DT::datatable(
957
+ reviewers %>% dplyr::group_by(reviewers) %>%
958
+ dplyr::summarize(nbr_reviews = length(year),
959
+ timespan = paste(unique(c(min(year), max(year))),
960
+ collapse = " - ")) %>%
961
+ dplyr::arrange(desc(nbr_reviews)),
962
+ escape = FALSE, rownames = FALSE,
963
+ filter = list(position = 'top', clear = FALSE),
964
+ options = list(scrollX = TRUE)
965
+ )
966
+ ```
967
+
968
+ ## Past year
969
+
970
+ ``` {r most-reviewers-past-year, class.source = 'fold-hide', message = FALSE}
971
+ reviewers <- papers %>%
972
+ dplyr::filter(!grepl("rOpenSci|pyOpenSci", prerev_labels)) %>%
973
+ dplyr::mutate(year = year(published.date)) %>%
974
+ dplyr::filter(as.Date(published.date) >= (lubridate::today() - 365.25)) %>%
975
+ dplyr::select(reviewers, year) %>%
976
+ tidyr::separate_rows(reviewers, sep = ",")
977
+
978
+ ## Most active reviewers
979
+ DT::datatable(
980
+ reviewers %>% dplyr::group_by(reviewers) %>%
981
+ dplyr::summarize(nbr_reviews = length(year),
982
+ timespan = paste(unique(c(min(year), max(year))),
983
+ collapse = " - ")) %>%
984
+ dplyr::arrange(desc(nbr_reviews)),
985
+ escape = FALSE, rownames = FALSE,
986
+ filter = list(position = 'top', clear = FALSE),
987
+ options = list(scrollX = TRUE)
988
+ )
989
+ ```
990
+
934
991
# Number of papers per editor and year
935
992
936
993
``` {r papers-per-editor, class.source = 'fold-hide', message = FALSE, fig.width = 16, fig.height = 15}
0 commit comments