Created
September 6, 2011 21:47
-
-
Save thedod/1199075 to your computer and use it in GitHub Desktop.
cable2graph of (TELAVIV|JERUSALEM) related clusters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from il_related import il_related | |
sg = g.subgraph(g.vs.select(_degree_gt=1, place_in=il_related)) | |
print sg.summary() | |
i = 0 | |
for c in sg.clusters(): | |
if len(c) > 10: | |
ssg = sg.subgraph(sg.vs.select(c)) | |
filename = 'il-rel-%03d.gml' % i | |
print filename | |
print ssg.summary() | |
ssg.write_gml(filename) | |
i+=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment