技术控

今日:120| 主题:49552

[其他] Network Analysis Part 2 Exercises

99 2

立即注册CoLaBug.com会员，免费获得投稿人的专业资料，享用更多功能，玩转个人品牌！

x
(This article was first published on R-exercises , and kindly contributed toR-bloggers)

In this set of exercises we shall practice the functions for network statistics, using package igraph .If you don’t have package already installed, install it using the following code:
[code]

install.packages("igraph")

[/code]  and load it into the session using the following code:
[code]

library("igraph")

Answers to the exercises are available here .
If you have different solution, feel free to post it.
A number of employees in a factory was interviewed on a question: “Do you like to work with your co-worker?”. Possible answers are 1 for yes and 0 for no . Each employee gave an answer for each other employee thus creating an adjecancy matrix. You can download the dataset from here .
Exercise 1

Load the data and create an unweighted directed graph from the adjecancy matrix. Name the nodes as letters A to Y. Set node color to yellow and shape to sphere. Set the edge’s color to gray and arrow size to 0.2.
Exercise 2

Plot the graph.
Exercise 3

Calculate network diameter and average closeness.
Exercise 4

Calculate average network betweenness.
Exercise 5

Calculate network density and average degree.
Exercise 6

Calculate network reciprocity and average transitivity.
Exercise 7

Calculate average eccentricity of the vertices. What is the average distance between two nodes?
Exercise 8

Find the hubs and plot graph with node’s size according to their hubs index. Which employee is the biggest hub?
Exercise 9

Find the authorities and plot graph with node’s size according to their authority index. Which employee is the biggest authority?
Exercise 10

Show the nodes that make diameter. Plot these nodes larger and in red. Plot edges on this path thicker in red.

 我们都知道恶虎架不住群狼。说明：”团队很重要！”

 吹牛的人越来越多了！

• 网购衣服送宠物？快递里跑出活老鼠吓晕买家

hello，大家好啊，欢迎收看本期的《TeX秀》。 这 [...]

• 跳票也值了！苹果AirPods全新功能史无前例

在今年10月份的秋季新品发布会上，苹果随新一代i [...]

• 世界上最爱你的人 微信背景图片

有时，爱也是种伤害，善良的人，总是选择伤害 [...]

• 网络热议：拍部中国版《你的名字。》有多难

《你的名字。》剧照。 《血战钢锯岭》海 [...]

• 青春是一阵偶尔划过的风 微信背景图片

男人哭了，是因为他真的爱了;女人哭了，是因为 [...]

• 我是超人 微信背景图片

我只会对值得我付出的人付出，不管是友情还是爱 [...]