国家(地区)重要性计算方法:网络科学重要节点挖掘(国际贸易网络)
(想要排序数据的可以私信~)
library(RColorBrewer)
library(ggplot2)
getPalette = colorRampPalette(brewer.pal(11, "Spectral"))
p_rank_g<-ggplot(data=new_rank_g,aes(x=year,y=ranking,color=factor(name),fill=factor(name)))+theme_bw()+theme( panel.grid =element_blank(),
title = element_text(size=11,family = "STKaiti"),
axis.text=element_text(size=7),
axis.title=element_text(size=9,family ="STKaiti"),
legend.position = "none"
)+scale_y_continuous(expand=c(0.01,0.01))+scale_x_continuous(position="top",limits = c(2006,2017),expand=c(0.001,0.001),breaks=seq(2008,2016,2))+scale_color_manual(values=getPalette(199))+geom_line(alpha=0.4)+geom_point(size=1,alpha=1
)+xlab("")
p_rank_g<-p_rank_g+geom_text(data=new_rank_g[new_rank_g$year==2007,],aes(x=year-0.5,y=ranking,label=name),size=1,color="black",family="STKaiti"
)+geom_text(data=new_rank_g[new_rank_g$year==2016,],aes(x=year+0.5,y=ranking,label=name),size=1,color="black",family="STKaiti")
png("ranking1.png", width=1000,height=3500,res=500)
print(
p_rank_g
)
dev.off()