# 第 8 章 潜力学科

## 8.3 各学科进入ESI的阈值

ThresholdESI <- read_rds("./data/dataset/ThresholdESI_set.rds")
ThresholdESI %>%
knitr::kable( booktabs = T,
caption = "各学科进入ESI的阈值(2017年8月数据)") %>%
kable_styling("striped")

Category_ESI_cn Lowest_Cited_ESI

## 8.4 潜力学科统计

potent <- complete_set %>%
group_by(University_cn, Category_ESI_cn) %>%
summarise(sumcited = sum(TC), meancited = round(mean(TC),2)) %>%
filter( !is.na(Category_ESI_cn) ) %>%
left_join(ThresholdESI, by = "Category_ESI_cn") %>%
mutate( pd= round(sumcited/Lowest_Cited_ESI, 3)  ) %>%
#filter( pd > 0.1 ) %>%
arrange(University_cn, pd) %>%
select(University_cn, Category_ESI_cn, pd) %>%
filter(University_cn %in% c("四川师范大学", "成都理工大学",
"西华师范大学","西华大学")
) %>%
ungroup()  
potent
library(gridExtra)
library(grid)
library(ggpubr)
library(scales)

pplot <- function(df){

p<- df %>%
ggplot( aes(x = fct_reorder(Category_ESI_cn, pd), y = pd, fill = University_cn, width=0.75)) +
geom_bar(stat = "identity") +
scale_fill_discrete(drop=F)+
theme_bw()+
theme(legend.position="none")+
labs(y="potential index", x="", title=unique(df$University_cn))+ scale_y_continuous(expand = c(0,0),labels=percent) + coord_flip() } glist <- potent %>% mutate(University_cn = factor(University_cn)) %>% split(.$University_cn) %>%
map(~pplot(.))

ggpubr::ggarrange(plotlist = glist, nrow = 2, ncol = 2)