Skip to content

Instantly share code, notes, and snippets.

@ryazwinski
Forked from ptwobrussell/gist:668166
Created March 10, 2011 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryazwinski/865045 to your computer and use it in GitHub Desktop.
Save ryazwinski/865045 to your computer and use it in GitHub Desktop.
Visualizing Twitter Search Results with Protovis and/or Graphviz is this easy:
$ easy_install twitter # See https://github.com/sixohsix/twitter and http://pypi.python.org/pypi/setuptools
$ git clone https://github.com/ptwobrussell/Mining-the-Social-Web.git
$ cd Mining-the-Social-Web/python_code
$ python introduction__retweet_visualization.py TeaParty # or whatever you want to search for
Your browser should pop open and display the results as a force directed graph, but also check your console for some useful output.
You can create an image file from the DOT language output with a command like the following:
$ circo -Tpng -Otwitter_retweet_graph twitter_retweet_graph.dot
Fork the code and have some fun with it! Also consider picking up a copy of Mining the Social Web if you find this kind of stuff interesting: http://amzn.to/d1Ci8A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment