Twitter Stats

Wednesday, January 2nd, 2008

Damon Cortesi created an awesome script to generate some statistics about your twitter usage. Unfortunately, it used Numbers to generate its charts, and I don’t happen to have Numbers on this machine.

Mike McCracken then made a version that used gnuplot, but to build gnuplot you need to build X11, and well, I don’t have all day.

So I, feeling an itch, I decided to use the Google Charts API to create the charts. It only took about an hour or so to get everything working, Google Charts is quite easy to use (although a little limited). I wrote a python script to parse the output of Damon’s perl script and create an HTML page, which you can upload to your server. Chalk up another one for the web ;)

I’m also pretty excited by the distributed hacking going on around these scripts. It felt really easy to just download the source, start hacking, and post a new version. That’s exactly the kind of culture I want to be in, and I think it’s a really good sign.

Damon’s perl script and my python script are both here:

You can check out my twitter stats, too. You can clearly see where I went on vacation in December and June.


  1. DCortesi . blog » Twitter Stats replied on January 2nd, 2008:

    […] gnuplot: Twitter Stats in SVG Using GNUPlot @cbarrett modified it to utilize the Google Chart API: Twitter Stats with GChart @kejadlen reverse engineered my original script to Ruby: Twitter Stats in […]

  2. Victoria replied on January 2nd, 2008:

    Works great! Thanks @cbarret :)

  3. Anonymous replied on January 2nd, 2008:

    “but to build gnuplot you need to build X11, and well, I don’t have all day.”

    s/build/install/g, and in any case several distros specifically offer gnuplot packages that do not depend on X.

  4. dafi replied on January 3rd, 2008:

    Very cool, thanks

  5. Uptonian Thoughts » Twitter Stats - Thomas Upton And His Musings replied on March 29th, 2008:

    […] Damon Cortesi wrote a pretty nifty script to grab some Twitter statistics. A bunch of people modified his script in order to webify it, plot the results using gnuplot, and plot the results with the Google Charts API. […]