GraphLab | Strata 2014 - Six Degrees of Kevin Bacon

User 2 | 2/13/2014, 1:24:43 AM

<div class="EmbeddedContent"><img src="http://graphlab.com/images/GLlogoFUSTACKED300.png" class="LeftAlign" /><strong>GraphLab | Strata 2014 - Six Degrees of Kevin Bacon</strong> <p>Welcome to the GraphLab Graph Analytics toolkit. In this notebook we'll use the toolkit to explore American films from the decade 2004-2013 and answer the question of whether Kevin Bacon is really the best actor to put at the center of the the Kevin Bacon game.</p> <p><a href="http://graphlab.com/learn/notebooks/graphanalytics_movies.html">Read the full story here</a></p><div class="ClearFix"></div></div>

Comments

User 9 | 2/13/2014, 1:24:44 AM

Brian, this is a great notebook! Easy to follow. Thanks for posting.


User 104 | 3/10/2014, 1:50:22 AM

Interesting work!


User 233 | 4/18/2014, 10:40:57 PM

Damn, pretty great stuff guys!


User 421 | 7/25/2014, 9:46:24 PM

url = 'https://s3.amazonaws.com/GraphLab-Datasets/americanMovies/freebaseperformances.csv' urllib.urlretrieve(url, filename='freebaseperformances.csv') # downloads an 8MB file to the working directory

Are they still the valid comments? I tried many times and could not download the files and always got IOErrors.


User 14 | 7/26/2014, 1:43:28 AM

Yes, I copy-pasted the url: https://s3.amazonaws.com/GraphLab-Datasets/americanMovies/freebase_performances.csv in my browser and it downloads the csv. Maybe you are behind a firewall which blocks AWS S3? If that's the case, we can try sending you the csv file via email.


User 421 | 7/28/2014, 2:28:35 PM

Thanks, Jay. Instead of 'url=...", I used graphlab.SFrame.readcsv('https://s3.amazonaws.com/GraphLab-Datasets/americanMovies/freebaseperformances.csv') to read the data in.


User 421 | 7/29/2014, 4:48:57 PM

Every is cool until this point:

In [36]:

target = 'Lydia Fox' target in actors

path = [x[0] for x in sp.get_path(target, show=True, highlight=films)]

TypeError Traceback (most recent call last) <ipython-input-36-dbaec189c874> in <module>() 2 target in actors 3 ----> 4 path = [x[0] for x in sp.get_path(target, show=True, highlight=films)]

/Users/pzhang/graphlab/lib/python2.7/site-packages/graphlab/toolkits/graphanalytics/shortestpath.pyc in getpath(self, vid, show, highlight, **kwargs) 152 153 if not isinstance(highlight, list): --> 154 raise TypeError, "Input 'highlight' must be a list." 155 156 pathnames = set([x[0] for x in path])

TypeError: Input 'highlight' must be a list.

previously, films has been defined as:

films = np.unique(data['film_name'])

I run this with v 0.9 and directly copied and pasted codes from Six Degrees of Kevin Bacon to my notebook.


User 421 | 8/4/2014, 4:45:35 PM

Brian: Thanks. It works. Pengchu


User 919 | 11/6/2014, 6:58:32 PM

I'm using a VM and got

In [10]: data['weight'] = .5

In [11]: data.show() Out[11]: <IPython.core.display.Javascript at 0x7f51c5b613d0>

Do I need to install other packages? Thanks!


User 919 | 11/7/2014, 7:31:28 PM

I did graphlab.canvas.settarget('ipynb') and nothing is shown. I repeated without doing graphlab.canvas.settarget('ipynb') and graphs displayed in Browser properly.


User 4 | 11/7/2014, 9:14:37 PM

Hi @geneweng‌ -- are you using an IPython Notebook server on an https server? If so, that is a known issue that will be fixed in the next release. Until then, you can work around it by using a plain http IPython Notebook server or the 'browser' target.