Skip to content

Instantly share code, notes, and snippets.

@thedod
Created September 6, 2011 21:47
Show Gist options
  • Save thedod/1199075 to your computer and use it in GitHub Desktop.
Save thedod/1199075 to your computer and use it in GitHub Desktop.
cable2graph of (TELAVIV|JERUSALEM) related clusters
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