Please send your reports to hse.ntwks@gmail.com with the subject of of the following structure:
[MAGOLEGO SNA 2015] {LastName} {First Name} HA{Number}
Late submission policy: -1 point per day
Use this file as a template for your report.
Support your computations with figures and comments. Send ONLY .Rmd versions of your report.
In the second task, you will work with a large directed graph.
Please download flickr.mat
Data contains sparse matrix A and list of user names. This is a denser part of the Flickr photo sharing site friendship graph from 2006. Edge direction corresponds to friendship requests (following). Some of the links are reciprocal, others not
It’s a Matlab file. How to deal with it in R? There is a package R.matlab. Please install it and call library(R.matlab)
Now use readMat function to read the file and extract adjacency matrix and a list of user names:
flickr = readMat("YOUR_PATH/flickr.mat")
fmatrix=as.matrix(flickr[1]$A)
fnames=flickr[2]$names
Look at user names. You might want to remove spaces from the names. Use a function gsub to remove them:
fnames=gsub(" ", "", fnames)
Now create a graph, output the number of vertices and edges:
## Put your code here
Compute in- and out- degree centralities, PageRank, Hubs and Authorities for this network:
## Put your code here
Print top ten names in each ranking:
## Put your code here
Produce the following plots:
In-degree centralities versus out-degree centralities
In-degree centralities versus authorities
Out-degree centralities versus hubs
Hubs versus authorities
PageRank versus hubs
PageRank versus authorities
## Put your code here
Comment on the relationships between different centrality metrics