**Your network vs. random** (4 points)

For this lab, you will need to use your Facebook network from 2nd lab

- Compute the average clustering coefficient (Net>Vector>Clustering Coefficients>CC1) and average shortest path (Net>Paths between two vertices > Distribution of distances > From all vertices and look in the report window).
- Select two of your buddies. Look up the value of their individual clustering coefficient in your network.
- Highlight their ego-networks (just them and their friends) and explain the clustering coefficient in terms of their number of friends (well, their number of their friends who are also your friends) and the number of edges they have between them.
- Construct a random network with the same number of nodes and average degree (Net>Random Network>Erdos-Renyi>undirected). Visualize it and include an image.
- Compute the average clustering coefficient and average shortest path for the corresponding random graph.
- Describe how the clustering coefficient and average shortest path of your social network compare to its random counterpart.
- From this conclude whether or not it exhibits small world properties. (bonus)

- Go to http://ccl.northwestern.edu/netlogo/models/GiantComponent and launch the applet. Click 'setup' and then 'go'.
- Try it with 80 nodes and then 400 (if your computer can not compute, use smaller node sizes). Observe what happens right around the point where the average degree is 1 (the vertical line in the plot). Comment about the variation in the size of the largest component as you increase the number of edges/nodes.

Download the file poliblog.gdf from cTools . It represents the citation patterns between 40 list blogs during a couple of months preceding the 2004 presidential election, along with the political leaning of those blogs. Open it in Guess (one way of doing this is by clicking the "Load GDF/GraphML" button after guess starts up). Do the following (submit just the final image and the list of commands you used).

- Lay the network out using your layout algorithm of choice.
Follow up with the
`center`and`rescaleLayout()`commands, to adjust the position of the network and the size of the vertices. - Play with the zoomable interface and figure out how to reposition the nodes.
- Use the information window to find out what attributes of nodes and edges are specified.
- Color the conservative blogs red and the liberal ones blue. Color the edges differently depending on the leaning of the from and to nodes.
- Compute the indegree for all nodes at once and resize the nodes according to indegree using the
`resizeLinear(indegree,minsize,maxsize)`command, where you specify minsize and maxsize. - Change the width of the edges to reflect the number of citations (given with the 'weight' attribute) using the
`resizeLinear()`command. - Make a couple of observations about the blog network and discuss whether modifying the visualization with the above steps helped you.
- Save the commands and turn in along with your exported image. Insert both into your report document.

You may save the commands in a .py file to repeat the process.
You would need to call `execfile("yourfilename.py")`, or select `File>Run Script` in the dropdown menu.
To save your network with the new colors & positions, you could use the `exportGDF(“filename.gdf”)` command.
You could also have created a persistent database when starting Guess.

Submission of your homework is via WebCampus. You must submit all the required files in a single tar or zip file containing all the files for your submission.

Acknowledgement: The assignment is modified from Lada Adamic.