```{css echo=FALSE} @font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; src: url('fonts/figtree-v5-latin_latin-ext-regular.woff2') format('woff2'); }
body { font-family: 'Figtree'; }
```r # unit_codes for testing: # # u1g9umtq # u1jr9fll # u1ygqmuy # u13bp6vd # u18qe64m # u1o2ujjd library(flexdashboard) library(DT) library(readr) library(purrr) library(dplyr) library(ggplot2) library(gridExtra) library(bibliomatrix) library(tidyr) library(scales) #library(plotly) library(kableExtra) library(glue) library(extrafont) library(kthapi) library(DBI) library(ktheme) #library(tidyquant) library(zoo) colors_vb <- palette_kth_neo(17) # Retrieve result tables to use in tabs and key indicators data <- data.frame() if (params$embed_data || !params$use_package_data) { con <- con_bib() data <- abm_data( con = con, unit_code = params$unit_code, pub_year = abm_config()$start_year:abm_config()$stop_year, analysisId = abm_config()$analysis_id ) %>% collect() dbDisconnect(con) } if (params$use_package_data != TRUE) { df_diva <- abm_table1(data) df_diva_full <- abm_table1_full(data) df_cit3y <- abm_table2(data) df_cf <- abm_table3(data) df_jcf <- abm_table4(data) df_copub <- abm_table5(data) df_oa <- abm_table6(data) df_scop_cit <- abm_table_scop_cit(data) df_scop_normcit <- abm_table_scop_normcit(data) df_scop_snip <- abm_table_scop_snip(data) df_scop_copub <- abm_table_scop_copub(data) df_coverage <- abm_coverage(data) con <- con_bib() unit_meta <- unit_info(con = con) %>% filter(unit_code == params$unit_code) analysis_date <- get_analysis_date(con = con) df_copub_countries <- abm_copub_countries(con = con, unit_level = ifelse(isTRUE(unit_meta$org_level >= 0), unit_meta$org_level, 3), unit_code = params$unit_code, analysisId = abm_config()$analysis_id, analysis_start = abm_config()$start_year, analysis_stop = abm_config()$stop_year) df_copub_orgs <- abm_copub_orgs(con = con, unit_level = ifelse(isTRUE(unit_meta$org_level >= 0), unit_meta$org_level, 3), unit_code = params$unit_code, analysisId = abm_config()$analysis_id, analysis_start = abm_config()$start_year, analysis_stop = abm_config()$stop_year) df_sdg_year <- abm_sdg_year(con = con, data = data, analysisId = abm_config()$analysis_id, analysis_start = abm_config()$start_year, analysis_stop = abm_config()$stop_year) df_sdg_table <- abm_sdg_table(con = con, data = data, analysisId = abm_config()$analysis_id, analysis_start = abm_config()$start_year, analysis_stop = abm_config()$stop_year) dbDisconnect(con) } else { df_diva <- pluck(abm_public_kth$units, params$unit_code, "diva") df_diva_full <- pluck(abm_public_kth$units, params$unit_code, "diva_full") df_cit3y <- pluck(abm_public_kth$units, params$unit_code, "wos_cit3y") df_cf <- pluck(abm_public_kth$units, params$unit_code, "wos_cf") df_jcf <- pluck(abm_public_kth$units, params$unit_code, "wos_jcf") df_copub <- pluck(abm_public_kth$units, params$unit_code, "wos_copub") df_copub_countries <- pluck(abm_public_kth$units, params$unit_code, "wos_copub_countries") df_copub_orgs <- pluck(abm_public_kth$units, params$unit_code, "wos_copub_orgs") df_oa <- pluck(abm_public_kth$units, params$unit_code, "oa") df_scop_cit <- pluck(abm_public_kth$units, params$unit_code, "scop_cit") df_scop_normcit <- pluck(abm_public_kth$units, params$unit_code, "scop_normcit") df_scop_snip <- pluck(abm_public_kth$units, params$unit_code, "scop_snip") df_scop_copub <- pluck(abm_public_kth$units, params$unit_code, "scop_copub") df_coverage <- pluck(abm_public_kth$units, params$unit_code, "coverage") df_sdg_year <- pluck(abm_public_kth$units, params$unit_code, "scop_sdg_year") df_sdg_table <- pluck(abm_public_kth$units, params$unit_code, "scop_sdg_table") unit_meta <- filter(abm_public_kth$meta, unit_code == params$unit_code) analysis_date <- get_analysis_date() } unit_level <- unit_meta %>% pull(org_level) if(isTRUE(unit_level >= 0)){ unit_label <- abm_public_kth$meta %>% filter(unit_code == params$unit_code) %>% pull(unit_long_en) } else { unit_label <- kth_displayname(user = params$unit_code, "kthid") } #unit_label <- paste0("Annual Bibliometric Monitoring: ", unit_label) current_date <- format(Sys.Date(), "%Y%m%d") abm_unit_title <- paste0("ABM: ", unit_label) STATIC <- "https://kth-library.github.io/abm"
r unit_label
yrfields <- grep("^[1-2][0-9]{3}$", names(df_diva), value = TRUE) firstyear <- min(yrfields) lastyear <- max(yrfields) as_range <- function(x, delim = "-") { y <- as.integer(x) paste(collapse = delim, na.omit(dplyr::case_when( is.finite(y) ~ y ))) }
r as_range(lastyear)
abm_ui_valuebox_publications(df_diva, lastyear, colors_vb[1], unit_label)
r as_range(c(firstyear, lastyear))
abm_ui_valuebox_coverage(df_coverage, colors_vb[1], "wos", unit_label)
r as_range(c(firstyear, lastyear))
abm_ui_valuebox_coverage(df_coverage, colors_vb[1], "scopus", unit_label)
has_rows <- df_cf %>% filter(!is.na(pubs_frac)) %>% nrow() > 0 last_interval <- ifelse(has_rows, paste((as.numeric(nth(df_cf$Publication_Year, -2))-2),nth(df_cf$Publication_Year, -2), sep = "-"), "")
r last_interval
(WoS) {.no-padding .no-mobile}abm_ui_bullet_citations(df_cf)
r last_interval
(WoS) {.no-padding .mobile}abm_ui_bullet_citations(df_cf)
has_rows <- df_jcf %>% filter(!is.na(pubs_frac)) %>% nrow() > 0 last_interval <- ifelse(has_rows, paste((as.numeric(nth(df_jcf$Publication_Year, -2))-2),nth(df_jcf$Publication_Year, -2), sep = "-"), "")
r last_interval
(WoS) {.no-padding .no-mobile}abm_ui_bullet_journal(df_jcf)
r last_interval
(WoS) {.no-padding .mobile}abm_ui_bullet_journal(df_jcf)
has_rows <- df_copub %>% filter(!is.na(P_full)) %>% nrow > 0 last_interval <- ifelse(has_rows, paste((as.numeric(nth(df_copub$Publication_Year, -2))-2),nth(df_copub$Publication_Year, -2), sep = "-"), "")
r last_interval
(WoS) {.no-padding .no-mobile}abm_ui_waffle_copub(df_copub)
r last_interval
(WoS) {.no-padding .mobile}abm_ui_waffle_copub(df_copub)
woscov <- df_coverage %>% filter(Publication_Type == "Peer reviewed") %>% summarise(woscov = sum(sumwos_frac) / sum(p_frac)) %>% pull(woscov) cat("<p>Indicators in the Citation impact, Journal impact and Co‑publishing tabs are based on Web of Science publications only. Corresponding Scopus indicators can be found under the Scopus tab.</p>") if(isTRUE(unit_level >= 0)){ #<span title='mytitle' onclick=\"window.location.href='https://KTH-Library.github.io/abm/ABM_guide.pdf';\" style='cursor: pointer;></span>' glue("<p><span title='Legend: 75% or above is high, 60% or above is moderate while lower than 60% is low'>Overall Web of Science coverage for peer reviewed publications in this unit is ", "<b>{coveragetext(woscov)}, {100*round(woscov, 3)}%</b>.</span></p>") } else { cat("<p><b>Bibliometric results for individual researchers should always be interpreted with caution. </b></br/> Bibliometric indicators work best at an aggregated level, and at the individual level the publication profile of researchers, their collaboration networks and their subject specialization may interact with e.g. the field-normalization of citation indicators. The relatively low publication volume of individuals also makes indicator averages very unreliable. </p>") } cat("<p>Note that the coverage numbers for Web of Science and Scopus apply to publications in the KTH bibliometric database Bibmet. If a WoS-id or Scoupus-id from DiVA can not be matched in Bibmet, it does not count as covered.</p>")
The bibliometric indicators referred are based on publications registered in DiVA and published r abm_config()$start_year
to r abm_config()$stop_year
. Only publications which have been affiliated to KTH are included. This means that publications written by a researcher before she/he was employed at KTH, and that are not affiliated to KTH, will not be included in the statistics.
Statistics regarding citations and co‑publishing are based on the subset of publications in DiVA that are registered in Web of Science (Citation impact, Journal impact and Co‑publishing tabs) or Scopus (Scopus tab).
Extraction of publications and indicators from the KTH bibliometric database BibMet was conducted at r analysis_date
.
# download button for publication list unit_file_label <- params$unit_code if (isTRUE(unit_level == 1)){ unit_file_label <- unit_info() %>% filter(unit_code == params$unit_code) %>% pull(unit_short) } abm_ui_button_publist( data = data, is_loggedin = params$embed_data, unit_label = unit_label, unit_code = params$unit_code, unit_file_label = unit_file_label, is_authorbased = FALSE ) # DiVA Dream Portal button if (params$is_employee == TRUE) { abm_ui_button_diva() }
r unit_label
abm_ui_datatable_diva( df_diva, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_diva(df_diva)
abm_ui_datatable_diva_full( df_diva_full, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_diva_full(df_diva_full)
if (nrow(df_diva) > 0) { p <- abm_graph_diva(df_diva) p } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
if (nrow(df_diva) > 0) { p } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
if (nrow(df_diva %>% left_join(get_pubtype_order(), by = c("Publication_Type_DiVA" = "diva_publication_type")) %>% filter(WoS_coverage != 0)) > 0) { p <- abm_graph_wos_coverage(df_diva) p } else { shiny::HTML("<p><i>There are no data available for this graph</i></p>") }
if (nrow(df_diva) > 0) { p } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
r unit_label
r timegraph_header_legend()
if (df_cf %>% filter(!is.na(pubs_frac)) %>% nrow() > 0){ time_graph(df_cf, indicator = "cf", ma = TRUE, weight = "pubs_frac", refline = 1, ylabel = "Average Cf") } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
r timegraph_header_legend()
if (df_cf %>% filter(!is.na(pubs_frac)) %>% nrow() > 0){ time_graph(df_cf, indicator = "top10_share", ma = TRUE, weight = "pubs_frac", refline = .1, percent = TRUE, ylabel = "Share Top 10%") } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
abm_ui_datatable_cit3y( df_cit3y, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_cit3y(df_cit3y)
abm_ui_datatable_cf( df_cf, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_cf(df_cf)
cat("This table is based on Web of Science publication types Article, Proceedings paper, Review, Letter and Editorial.<br>") if(isTRUE(unit_level >= 0)){ years <- df_cit3y %>% filter(substr(Publication_Year, 1, 1) == "2") %>% pull(Publication_Year) %>% as.integer() mincov <- df_coverage %>% filter(Publication_Type == "Peer reviewed" & Publication_Year %in% years) %>% pull(woscov_frac) %>% min() minpubs <- df_coverage %>% filter(Publication_Type == "Peer reviewed" & Publication_Year %in% years) %>% pull(sumwos_full) %>% min() cat(glue("<span title='Legend: 75% or above is high, 60% or above is moderate while lower than 60% is low'>Rows are based on at least <b>{minpubs}</b> (full counted) publications with ", "<b>{coveragetext(mincov)}</b> Web of Science coverage (at least <b>{round(100*mincov, 1)}%</b>).<br>", "(DiVA publication types Article, peer review and Conference paper, peer review)<br></span>")) if(minpubs < 50) cat("<b>Indicators based on < 50 publications are considered unreliable</b>") } else { cat("<b>Bibliometric results for individual researchers should always be interpreted with caution.</b>") }
cat("This table is based on Web of Science publication types Article and Review.<br>") if(isTRUE(unit_level >= 0)){ woscov_cf <- df_coverage %>% filter(Publication_Type == "Article, peer review", Publication_Year %in% df_cf$Publication_Year) mincov <- min(woscov_cf$woscov_frac) minpubs <- min(woscov_cf$sumwos_full) cat(glue("<span title='Legend: 75% or above is high, 60% or above is moderate while lower than 60% is low'>Rows are based on at least <b>{minpubs}</b> (full counted) publications with ", "<b>{coveragetext(mincov)}</b> Web of Science coverage (at least <b>{round(100*mincov, 1)}%</b>).<br>", "(DiVA publication type Article, peer review)<br></span>")) if(minpubs < 50) cat("<b>Indicators based on < 50 publications are considered unreliable</b>") } else { cat("<b>Bibliometric results for individual researchers should always be interpreted with caution.</b>") }
r unit_label
r timegraph_header_legend()
if(df_jcf %>% filter(!is.na(pubs_frac)) %>% nrow() > 0) { time_graph(df_jcf, indicator = "jcf", ma = TRUE, weight = "pubs_frac", refline = 1, "Average Journal Cf") } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
r timegraph_header_legend()
if(df_cf %>% filter(!is.na(pubs_frac)) %>% nrow() > 0) { time_graph(df_jcf, indicator = "top20_share", ma = TRUE, weight = "pubs_frac", refline = .2, "Share Journal Top 20%", percent = TRUE) } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
abm_ui_datatable_jcf( df_jcf, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_jcf(df_jcf)
cat("This table is based on Web of Science publication types Article and Review.<br>") if(isTRUE(unit_level >= 0)){ woscov_jcf <- df_coverage %>% filter(Publication_Type == "Article, peer review", Publication_Year %in% df_jcf$Publication_Year) mincov <- min(woscov_jcf$woscov_frac) minpubs <- min(woscov_jcf$sumwos_full) cat(glue("<span title='Legend: 75% or above is high, 60% or above is moderate while lower than 60% is low'>Rows are based on at least <b>{minpubs}</b> (full counted) publications with ", "<b>{coveragetext(mincov)}</b> Web of Science coverage (at least <b>{round(100*mincov, 1)}%</b>).<br>", "(DiVA publication type Article, peer review)<br></span>")) if(minpubs < 50) cat("<b>Indicators based on < 50 publications are considered unreliable</b>") } else { cat("<b>Bibliometric results for individual researchers should always be interpreted with caution.</b>") }
r unit_label
abm_ui_datatable_copub_countries( df_copub_countries, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_copub_countries(df_copub_countries)
abm_ui_datatable_copub_orgs( df_copub_orgs, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_copub_orgs(df_copub_orgs)
r unit_label
if (df_oa %>% filter(!is.na(P_tot)) %>% nrow() > 0) { abm_graph_oa_lines(df_oa) } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
if (df_oa %>% filter(!is.na(P_tot)) %>% nrow() > 0) { abm_graph_oadata_stackedarea(df_oa) } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
abm_ui_datatable_oa( df_oa, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_oa(df_oa)
The Open Access type of the publications was fetched from the Unpaywall REST API. The method to determine the OA type is presented here.
In summary, the different OA types can be described as follows:
Diamond: The full text has been found on a publisher website, there is no article publication cost.
Gold: The full text has been found on a publisher website, in a journal that is fully OA.
Hybrid: The full text has been found on a publisher website, in a journal that is not fully OA.
Green: The full text has been found in an institutional repository, such as DiVA.
N.B.: This table is based on peer-reviewed publications for which Unpaywall could determine the OA type (necessary condition: have a DOI number). Unpaywall's method is empirical and does not strictly equate to copyright license. As a consequence, the OA status of a given publication may vary with time --- for example turning from "Not OA" to "Green" when a full text is added to DiVA.
r unit_label
r unit_label
if(df_sdg_table %>% filter(SDG_Displayname != 'None') %>% nrow() > 0) { abm_graph_sdg(df_sdg_table) } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
if(df_sdg_table %>% filter(SDG_Displayname != 'None') %>% nrow() > 0) { abm_graph_sdg_mobile(df_sdg_table) } else { shiny::HTML("<p><i>There are no publications available for this graph</i></p>") }
abm_ui_datatable_sdg_year( df_sdg_year, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_sdg_year(df_sdg_year)
abm_ui_datatable_sdg_table( df_sdg_table, unit_file_label = unit_file_label, unit_title = abm_unit_title )
abm_ui_kable_sdg_table(df_sdg_table)
cat("This table is based on Scopus publication types Article, Review and Conference Paper.<br>") if(isTRUE(unit_level >= 0)){ years <- df_scop_cit %>% filter(substr(Publication_Year, 1, 1) == "2") %>% pull(Publication_Year) %>% as.integer() mincov <- df_coverage %>% filter(Publication_Type == "Peer reviewed" & Publication_Year %in% years) %>% pull(scopcov_frac) %>% min() minpubs <- df_coverage %>% filter(Publication_Type == "Peer reviewed" & Publication_Year %in% years) %>% pull(sumscop_full) %>% min() cat(glue("<span title='Legend: 75% or above is high, 60% or above is moderate while lower than 60% is low'>Rows are based on at least <b>{minpubs}</b> (full counted) publications with ", "<b>{coveragetext(mincov)}</b> Scopus coverage (at least <b>{round(100*mincov, 1)}%</b>).<br>", "(DiVA publication types Article, peer review and Conference paper, peer review)<br></span>")) } else { cat("<b>Bibliometric results for individual researchers should always be interpreted with caution.</b>") }
cat("This table is based on Scopus publication types Article, Review and Conference Paper.<br>") if(isTRUE(unit_level >= 0)){ years <- df_scop_cit %>% filter(substr(Publication_Year, 1, 1) == "2") %>% pull(Publication_Year) %>% as.integer() mincov <- df_coverage %>% filter(Publication_Type == "Peer reviewed" & Publication_Year %in% years) %>% pull(scopcov_frac) %>% min() minpubs <- df_coverage %>% filter(Publication_Type == "Peer reviewed" & Publication_Year %in% years) %>% pull(sumscop_full) %>% min() cat(glue("<span title='Legend: 75% or above is high, 60% or above is moderate while lower than 60% is low'>Rows are based on at least <b>{minpubs}</b> (full counted) publications with ", "<b>{coveragetext(mincov)}</b> Scopus coverage (at least <b>{round(100*mincov, 1)}%</b>).<br>", "(DiVA publication types Article, peer review and Conference paper, peer review)<br></span>")) } else { cat("<b>Bibliometric results for individual researchers should always be interpreted with caution.</b>") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.