Thursday, November 26, 2009

using pydot with twitter

Was bored today so, I play around with pydot with twitter api

import twitter
import pydot
api = twitter.Api(username='usename',password='password')
g=pydot.Dot(graph_type='graph',font='verdana',overlap='false')
[g.add_edge(pydot.Edge('username',i.name)) for i in api.GetFriends()]
g.write_svg('socialnet.svg',prog='neato')


The result is.....not nice, because
1) The image is large
2) This is a very simple experiment, so i only check my follower, nothing in depth.

and i will not post the image, because of size, and privacy reason.
so probably more of this coming soon

No comments:

Post a Comment