Amazon Scrape -> SVG Graph in Ruby

I just spent a few minutes enjoying Mongrel and SVG::Graph while helping Rob visualize his Amazon Sales Rank for his book.

The code is available here with a running (maybe) example here. If all goes well, that should show you an SVG graph (thanks, Firefox) showing the changes in sales rank over time.

Rob’s code to generate the scrape is here.

Picture:
Rob Sales Rank

[Update: darcs get http://kfahlgren.com/code/]

One Response to “Amazon Scrape -> SVG Graph in Ruby”

  1. pansy says:

    Yes, SVG is great for creating graphs. I use JavaScript to create SVG graphs of Amazon Sales Rank at http://charteo.us. In fact “Rails Cookbook” is being tracked. Check out http://charteo.us/amzn/items/0596523696. If you don’t have FireFox15+, Opera9+ or IE with Adobe SVG Viewer plugin then it even creates PNG (using Rhino JavaScript and Apache Batik at the server) image.