Please answer the question by entering runable python code into the cells. Add comments at the beginning of each cell which list the packages that need to be installed (e.g., pip install collections). Run the code so that the output is visible in the notbook before you submit. The 4 data files which you download should lie in the same directory as the python notebooks (use relative paths!). Only for the first 2 questions you have to provide unix commands. Please copy your commands together with the shell output into a text cell.
Submit the notebook (as .ipynb and .pdf) via email to email@example.com until June 11th.
Subject of email: "CSS2014 ass 1"
Filename: clwagner_mastrohmaier_ass1.ipynb and clwagner_mastrohmaier_ass1.pdf if Markus Strohmaier and Claudia Wagner worked together on assignment 1.
The Gowalla dataset contains all checkins between Feb 2009 and October 2010 (6.4 Mio checkins). The Brightkite dataset contains all checkins between April 2008 and October 2010 (4.5 Mio checkins).
Beside the checkin data that constitute an affiliation network (two-mode network of users and locations), we will also analyze the friendship network (one mode network of users). Note that in Gowalla the friendships are directed, in brightkite they are undirected. In this assignment we will treat both networks as undirected networks.
Fold the two-mode network and construct a location network. What are the most central locations in the one-mode network and what does that mean? Compute the degree centrality and print the ids and degrees of the 10 most central nodes.
Assume we ignore all locations where 0-1 different people checked in. That means we make the long tail of the degree distribution shorter. How would the entropy change?
If you are not on facebook ask a friend or colleauge and analyze his/her facebook ego network. Login to your Facebook account (or ask you friend to login) and go to https://developers.facebook.com/tools/explorer/ to obtain and set permissions for an access token and retrieved the "User Token" value from the Access Token Tool. Install facebook-sdk (pip install facebook-sdk)
Be sure to explore the permissions that are available by clicking on the "Get Access Token" button that's on the page and exploring all of the tabs available. For example, you will need to set the "friends_likes" option under the "Friends Data Permissions" since this permission is used by the script below but is not a basic permission and is not enabled by default.