#title Social Network Analysis [[TableOfContents]] ==== edgelist.txt ==== {{{ source target 2 6 3 6 3 17 4 7 5 7 6 5 7 19 7 23 7 22 8 23 8 12 9 24 9 4 10 6 10 23 11 14 12 17 12 13 12 20 13 3 14 18 14 2 15 21 16 11 16 22 17 11 18 19 19 18 19 24 19 2 19 21 19 25 20 1 20 10 21 19 22 8 22 19 23 9 24 18 24 23 25 7 25 8 25 19 27 26 27 6 26 20 26 6 26 19 26 27 }}} ==== R Source ==== {{{ library("igraph") edgelist <- read.table("c:\\rdata\\edgelist.txt", header=T) igraph <- graph.data.frame(edgelist, directed=TRUE) tkplot(igraph, layout=layout.fruchterman.reingold) metrics <- data.frame ( deg = degree(igraph), bet = betweenness(igraph), clo = closeness(igraph), eig = evcent(igraph)$vector, cor = graph.coreness(igraph) ) res<-as.vector(lm(eig~bet,data=metrics)$residuals) # install.packages("ggplot2") library("ggplot2") ggplot( metrics, aes(x=bet, y=eig,label=rownames(metrics),colour=res,size=abs(res))) + xlab("Betweenness Centrality") + ylab("Eigenvector Centrality") + geom_text() + ggtitle("Title text") # actor <- rownames(metrics) # metrics <- cbind(metrics, actor ) graph.density(igraph) centralization.evcent(igraph, directed=TRUE)$centralization centralization.degree(igraph)$centralization centralization.closeness(igraph)$centralization centralization.betweenness(igraph)$centralization }}} ==== key actors ==== * degree(number of connections) * betweenness(number of shortest paths an actor is on) * closeness(relative distance to all other actors) * eigenvector centrality(leading eigenvector of sociomatrix) ==== 참고자료 ==== * attachment:SocialNetworkAnalysis/sna.pptx * 네트워크 특성 * 중심성 * http://igraph.sourceforge.net/screenshots.html * http://toreopsahl.com/tag/social-network-analysis/ * http://igraph.wikidot.com/r-recipes * [http://www.riss.kr/search/download/FullTextDownload.do?control_no=dece12226dce6d63ffe0bdc3ef48d419&p_mat_type=be54d9b8bc7cdb09&p_submat_type=b51fa0b5ced94fec&fulltext_kind=a8cb3aaead67ab5b&t_gubun=&convertFlag=&naverYN=Y&outLink=N&colName=bib_t&DDODFlag=&loginFlag=1 공항네트워크 중심성 연구] * https://gephi.org/users/supported-graph-formats/spreadsheet/