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)

colors_vb <- palette_kth()
# Retrieve result tables to use in tabs and key indicators

# Get authorbased data for selected org
unit_code <- params$unit_code
con <- con_bib()
unit_members <- abm_researchers(unit_code)
unit_publ<- abm_staff_data(con, unit_members)
df_copub_countries <- abm_copub_countries_staffbased(con = con,
                                                     publist = unit_publ)
df_copub_orgs <- abm_copub_orgs_staffbased(con = con,
                                           publist = unit_publ)
df_sdg_year <- abm_sdg_year(con = con,
                            data = unit_publ)
df_sdg_table <- abm_sdg_table(con = con,
                              data = unit_publ)
DBI::dbDisconnect(con)

# Get ABM tables
df_diva <- abm_table1(unit_publ)
df_diva_full <- abm_table1_full(unit_publ)
df_cit3y <- abm_table2(unit_publ)
df_cf <- abm_table3(unit_publ)
df_jcf <- abm_table4(unit_publ)
df_copub <- abm_table5(unit_publ)
df_oa <- abm_table6(unit_publ)
df_scop_cit <- abm_table_scop_cit(unit_publ)
df_scop_normcit <- abm_table_scop_normcit(unit_publ)
df_scop_snip <- abm_table_scop_snip(unit_publ)
df_scop_copub <- abm_table_scop_copub(unit_publ)
df_coverage <- abm_coverage(unit_publ)

unit_level<- 2

if (unit_code %in% unit_info()$slug) {
  unit_label <- unit_info() %>% filter(slug == params$unit_code) %>% pull(unit_long_en)
} else {
  unit_label <- abm_divisions() %>% filter(id == unit_code) %>% pull(desc)
}

unit_file_label<- gsub("/", "_", unit_code)
current_date <- format(Sys.Date(), "%Y%m%d")
abm_unit_title<- paste0("ABM: ",unit_label)

# TODO: change to suitable location for static PDF assets (or other non-HTML resources)
STATIC <- "https://kth-library.github.io/abm"
cat(sprintf("<style>                     
.navbar {
  background-color:%s;
}
.nav-tabs-custom > .nav-tabs > li > a {
  font-size: 1.5rem
}
</style>", colors_vb["cerise"]),
'<style type="text/css">
  body{
  font-family: Figtree;
}
</style>'
)

Overview

r unit_label

Row {data-height=240}

yrfields <- grep("^[1-2][0-9]{3}$", names(df_diva), value = TRUE)
firstyear <- min(yrfields)
lastyear <- max(yrfields)

Publications in DiVA r ifelse(!is.na(lastyear), lastyear, "")
(fractional counts)

abm_ui_valuebox_publications(df_diva, lastyear, colors_vb["cerise"], unit_label)

WoS coverage r ifelse(!is.na(firstyear), paste(firstyear, "-", lastyear), "")
(peer reviewed)

abm_ui_valuebox_coverage(df_coverage, colors_vb["cerise"], "wos", unit_label)

Scopus coverage r ifelse(!is.na(firstyear), paste(firstyear, "-", lastyear), "")
(peer reviewed)

abm_ui_valuebox_coverage(df_coverage, colors_vb["gray"], "scopus", unit_label)
has_rows <- df_cf %>% filter(!is.na(P_frac)) %>% nrow() > 0
last_interval <- ifelse(has_rows, nth(df_cf$interval, -2), "")

Citation impact r last_interval (WoS) {.no-padding .no-mobile}

abm_ui_bullet_citations(df_cf)

Citation impact r last_interval (WoS) {.no-padding .mobile}

abm_ui_bullet_citations(df_cf)
has_rows <- df_jcf %>% filter(!is.na(P_frac)) %>% nrow() > 0
last_interval <- ifelse(has_rows, nth(df_jcf$interval, -2), "")

Journal impact r last_interval (WoS) {.no-padding .no-mobile}

abm_ui_bullet_journal(df_jcf)

Journal impact 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, nth(df_copub$interval, -2), "")

Co‑publishing r last_interval (WoS) {.no-padding .no-mobile}

abm_ui_waffle_copub(df_copub)

Co‑publishing r last_interval (WoS) {.no-padding .mobile}

abm_ui_waffle_copub(df_copub)

Row

Notes more...{target="_blank" style="position:relative;float:right;"}

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&#8209;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) && nrow(df_coverage %>% filter(Publication_Type == "Peer reviewed")) > 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 good, 60% or above is moderate while lower than 60% is poor'>Overall Web of Science coverage for peer reviewed publications in this unit is ",
       "{coveragetext(woscov)}, {100*round(woscov, 3)}%.</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>")

Row

Background

The bibliometric indicators referred are based on publications registered in DiVA. Only publications from currently employed researchers at KTH are included. The rolling nature of this report means that it provides more of a current overview and less of a historic stable trend, since it excludes publications written by researchers that are no longer affiliated to KTH, but have been at some point in time.

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.

Row

Researchers at the unit

abm_ui_button_publist(
  data = unit_publ,
  is_loggedin = params$embed_data, 
  unit_label = unit_label, 
  unit_code = unit_code, 
  unit_file_label = unit_file_label,
  is_authorbased = TRUE
)
con <- con_bib()
researchers <- abm_staff_list(con, unit_code)
DBI::dbDisconnect(con)

abm_ui_datatable_researchers(
  data = researchers, 
  unit_file_label = unit_file_label,
  unit_title = abm_unit_title
)

Publication summary

r unit_label

Row {.tabset data-height=700}

Fractional count

Publication volume, fractionalized {.no-padding .no-mobile}

abm_ui_datatable_diva(
  df_diva,
  unit_file_label = unit_file_label,
  unit_title = abm_unit_title
)

Publication volume, fractionalized {.no-padding .mobile}

abm_ui_kable_diva(df_diva)

Full count

Publication volume, full count {.no-padding .no-mobile}

abm_ui_datatable_diva_full(
  df_diva_full, 
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)

Publication volume, full count {.no-padding .mobile}

abm_ui_kable_diva_full(df_diva_full)

Row

Publication volume {.no-padding .no-mobile}

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>")
}

Publication volume {.no-padding .mobile}

if (nrow(df_diva) > 0) {
  p
} else {
  shiny::HTML("<p><i>There are no publications available for this graph</i></p>")
}

Web of Science coverage by publication type {.no-padding .no-mobile}

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>")
}

Web of Science coverage by publication type {.no-padding .mobile}

if (nrow(df_diva) > 0) {
  p
} else {
  shiny::HTML("<p><i>There are no publications available for this graph</i></p>")
}

Citation impact

r unit_label

Row {data-height=350}

Citations 3-year window, fractional counts {.no-mobile}

abm_ui_datatable_city3y(
  df_cit3y, 
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)

Citations 3-year window, fractional counts {.mobile}

abm_ui_kable_cit3y(df_cit3y)

Field normalized citations, fractionalized (3-year moving average) {.no-mobile}

abm_ui_datatable_cf(
  df_cf,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)

Field normalized citations, fractionalized (3-year moving average) {.no-padding .mobile}

abm_ui_kable_cf(df_cf)

Row

Notes more...{target="_blank" style="position:relative;float:right;"}

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_ch, 1, 1) == "2") %>% pull(Publication_Year_ch) %>% 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 good, 60% or above is moderate while lower than 60% is poor'>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>")

}

Notes more...{target="_blank" style="position:relative;float:right;"}

cat("This table is based on Web of Science publication types Article and Review.<br>")

if(isTRUE(unit_level >= 0)){

  intervals <- df_cf %>% filter(substr(interval, 1, 1) == "2") %>% pull(interval)
  woscov_cf <- df_coverage %>%
    filter(Publication_Type == "Article, peer review")
  woscov_cf <- woscov_cf %>% 
    inner_join(sliding_intervals(min(woscov_cf$Publication_Year),
                                 max(woscov_cf$Publication_Year), 3),
               by = c("Publication_Year" = "x")) %>%
    filter(interval %in% intervals) %>%
    group_by(interval) %>% 
    summarise(woscov_frac = sum(sumwos_frac) / sum(p_frac),
              sumwos_full = sum(sumwos_full))

  mincov <- min(woscov_cf$woscov_frac)
  minpubs <- min(woscov_cf$sumwos_full)

  cat(glue("<span title='Legend: 75% or above is good, 60% or above is moderate while lower than 60% is poor'>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>")

}

Row

Average field normalized citations (Cf)

if (df_cf %>% filter(!is.na(P_frac)) %>% nrow() > 0){
  abm_graph_cf(df_cf)
} else {
  shiny::HTML("<p><i>There are no publications available for this graph</i></p>")
}

Share of publications among Top 10% cited

if (df_cf %>% filter(!is.na(P_frac)) %>% nrow() > 0){
  abm_graph_top10(df_cf)
} else {
  shiny::HTML("<p><i>There are no publications available for this graph</i></p>")
}

Journal impact

r unit_label

Row {data-height=350}

Journal impact, fractionalized (3-year moving average) {.no-mobile}

abm_ui_datatable_jcf(
  df_jcf,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)

Journal impact, fractionalized (3-year moving average) {.no-padding .mobile}

abm_ui_kable_jcf(df_jcf)

Row

Notes more...{target="_blank" style="position:relative;float:right;"}

cat("This table is based on Web of Science publication types Article and Review.<br>")

if(isTRUE(unit_level >= 0)){
  intervals <- df_jcf %>% filter(substr(interval, 1, 1) == "2") %>% pull(interval)
  woscov_jcf <- df_coverage %>%
    filter(Publication_Type == "Article, peer review")
  woscov_jcf <- woscov_jcf %>% 
    inner_join(sliding_intervals(min(woscov_jcf$Publication_Year), max(woscov_jcf$Publication_Year), 3), by = c("Publication_Year" = "x")) %>%
    filter(interval %in% intervals) %>%
    group_by(interval) %>% 
    summarise(woscov_frac = sum(sumwos_frac) / sum(p_frac),
              sumcov_full = sum(sumwos_full))

  mincov <- min(woscov_jcf$woscov_frac)
  minpubs <- min(woscov_jcf$sumcov_full)

  cat(glue("<span title='Legend: 75% or above is good, 60% or above is moderate while lower than 60% is poor'>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>")

}

Row

Field normalized journal impact (JCf)

if(df_jcf %>% filter(!is.na(P_frac)) %>% nrow() > 0) {
  abm_graph_jcf(df_jcf)
} else {
  shiny::HTML("<p><i>There are no publications available for this graph</i></p>")
}

Share of publications in Top 20% journals

if(df_cf %>% filter(!is.na(P_frac)) %>% nrow() > 0) {
  abm_graph_top20(df_jcf)
} else {
  shiny::HTML("<p><i>There are no publications available for this graph</i></p>")
}

Co‑publishing {data-orientation=rows}

r unit_label

Row {.tabset data-height=1300}

Summary

International and Swedish non-university co‑publications (full counts) {.no-mobile}
abm_ui_datatable_copub(
  df_copub,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)
International and Swedish non-university co‑publications (full counts) {.no-padding .mobile}
abm_ui_kable_copub(df_copub)
Notes more...{target="_blank" style="position:relative;float:right;"}
cat("<hr>")
cat("This table is based on Web of Science publication types Article and Review.<br>")

if(isTRUE(unit_level >= 0)){
  intervals <- df_copub %>% filter(substr(interval, 1, 1) == "2") %>% pull(interval)
  woscov_copub <- df_coverage %>%
    filter(Publication_Type == "Article, peer review")
  woscov_copub <- woscov_copub %>% 
    inner_join(sliding_intervals(min(woscov_copub$Publication_Year), max(woscov_copub$Publication_Year), 3), by = c("Publication_Year" = "x")) %>%
    filter(interval %in% intervals) %>%
    group_by(interval) %>% 
    summarise(woscov_full = sum(sumwos_full) / sum(p_full))

  mincov <- min(woscov_copub$woscov_full)
  minpubs <- min(df_copub$P_full)

  cat(glue("<span title='Legend: 75% or above is good, 60% or above is moderate while lower than 60% is poor'>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>")

}
cat("<hr>")
##### **International and Swedish non-university co‑publication** wzxhzdk:42

Countries and organizations

Co‑publication countries {.no-mobile}

abm_ui_datatable_copub_countries(
  df_copub_countries,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
) 
Co‑publication countries {.no-padding .mobile}
abm_ui_kable_copub_countries(df_copub_countries) 
Co‑publication organizations {.no-mobile}
abm_ui_datatable_copub_orgs(
  df_copub_orgs,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
) 
Co‑publication countries {.no-padding .mobile}
abm_ui_kable_copub_orgs(df_copub_orgs) 

Open Access

r unit_label

Row {data-height=450}

Open Access publications, full counts {.no-mobile}

abm_ui_datatable_oa(
  df_oa,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)

Open Access publications, full counts {.no-padding .mobile}

abm_ui_kable_oa(df_oa)

Row

Overview of Open Access publications - piechart

if (df_oa %>% filter(!is.na(P_tot)) %>% nrow() > 0) {
  abm_graph_oadata_piechart(df_oa, type = "ggplot")
} else {
  shiny::HTML("<p><i>There are no publications available for this graph</i></p>")
}

Stacked area chart for publications

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>")
}

Row

Notes more...{target="_blank" style="position:relative;float:right;"}

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:

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.

Scopus

r unit_label

Row {.tabset data-height=1100}

Citation Impact

##### **Citations, open window** {.no-mobile} wzxhzdk:51 ##### **Citations, open window** {.mobile} wzxhzdk:52
##### **Field weighted citation impact (FWCI)** {.no-mobile} wzxhzdk:53 ##### **Field weighted citation impact (FWCI)** {.mobile} wzxhzdk:54
##### **Notes** [ more...](`r STATIC`/ABM_guide.html#scopus){target="_blank" style="position:relative;float:right;"} wzxhzdk:55 ##### **Notes** [ more...](`r STATIC`/ABM_guide.html#scopus){target="_blank" style="position:relative;float:right;"} wzxhzdk:56
##### **Average field weighted citation impact (FWCI)** wzxhzdk:57
##### **Share of publications among Top 10% cited** wzxhzdk:58

Journal Impact

##### **Journal impact, fractionalized (3-year moving average)** {.no-mobile} wzxhzdk:59 ##### **Journal impact, fractionalized (3-year moving average)** {.mobile} wzxhzdk:60 ##### **Notes** [ more...](`r STATIC`/ABM_guide.html#scopus){target="_blank" style="position:relative;float:right;"} wzxhzdk:61
##### **Field normalized journal impact (SNIP)** wzxhzdk:62
##### **Share of publications in Top 20% journals** wzxhzdk:63

Co‑publishing

International and corporate co‑publications (full counts) {.no-mobile}
abm_ui_datatable_scop_copub(
  df_scop_copub,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)
International and corporate co‑publications (full counts) {.mobile}
abm_ui_kable_scop_copub(df_scop_copub)
Notes more...{target="_blank" style="position:relative;float:right;"}
cat("<hr>")
cat("This table is based on Scopus publication types Article, Review and Conference Paper.<br>")

if(isTRUE(unit_level >= 0)){
  intervals <- df_scop_copub %>% filter(substr(interval, 1, 1) == "2") %>% pull(interval)
  scopcov_copub <- df_coverage %>%
    filter(Publication_Type == "Peer reviewed")
  scopcov_copub <- scopcov_copub %>% 
    inner_join(sliding_intervals(min(scopcov_copub$Publication_Year), max(scopcov_copub$Publication_Year), 3), by = c("Publication_Year" = "x")) %>%
    filter(interval %in% intervals) %>%
    group_by(interval) %>% 
    summarise(scopcov_full = sum(sumscop_full) / sum(p_full))

  mincov <- min(scopcov_copub$scopcov_full)
  minpubs <- min(df_scop_copub$P_full)

  cat(glue("<span title='Legend: 75% or above is good, 60% or above is moderate while lower than 60% is poor'>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>"))

  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("<hr>")
##### **International and corporate co‑publication** wzxhzdk:67

SDG

r unit_label

Row {data-height=450}

Publications with any Sustainable Development Goal (fractional counts) {.no-mobile}

abm_ui_datatable_sdg_year(
  df_sdg_year,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)

Publications with any Sustainable Development Goal (fractional counts) {.mobile}

abm_ui_kable_sdg_year(df_sdg_year)

Sustainable Development Goals (fractional counts) {.no-mobile}

abm_ui_datatable_sdg_table(
  df_sdg_table,
  unit_file_label = unit_file_label, 
  unit_title = abm_unit_title
)

Sustainable Development Goals (fractional counts) {.mobile}

abm_ui_kable_sdg_table(df_sdg_table)

Row {data-height=100}

Notes more...{target="_blank" style="position:relative;float:right;"}

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_ch, 1, 1) == "2") %>% pull(Publication_Year_ch) %>% 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 good, 60% or above is moderate while lower than 60% is poor'>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>")

}

Notes more...{target="_blank" style="position:relative;float:right;"}

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_ch, 1, 1) == "2") %>% pull(Publication_Year_ch) %>% 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 good, 60% or above is moderate while lower than 60% is poor'>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>")

}

Row {data-height=650}

Sustainable Development Goals (fractional counts)

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>")
}

About

Row {data-height=1024}



KTH-Library/bibliomatrix documentation built on Feb. 29, 2024, 5:54 a.m.