Rifgraf is a fire-and-forget web service for displaying graphs of data collected over time. Post your data points periodically via rest calls. Then view a graph of the data at any time in the future.
Let's try it!
1. Post some data points.
You'll probably do this from a cron job, but try it from an irb session first.
RestClient.post 'http://rifgraf.heroku.com/graphs/sample', :value => rand(99)
Or for the Ruby-impaired, from the shell:
$ curl http://rifgraf.heroku.com/graphs/sample -X POST -d value=$RANDOM
Replace "sample" with whatever graph name you want. This is the graph key.
2. Visit your graph.
http://rifgraf.heroku.com/graphs/sample
Replace "sample" with your chosen key. You're catching on, right?
3. Bask in the glory of the zoomable graph.
...with no clutter in your app's main database.
Rifgraf automatically timestamps data that you post, although you can include a :timestamp parameter if you want to use a different one. i.e.
RestClient.post 'http://rifgraf.heroku.com/graphs/sample', :value => 42, :timestamp => '1999-31-12'
Clear your all data from a graph and start fresh - the "how" won't be surprising to restafarians:
RestClient.delete 'http://rifgraf.heroku.com/graphs/sample'
Compare multiple graphs on the same chart with the "and" parameter: http://rifgraf.heroku.com/graphs/pirates?and=ninjas,robots
Use rifgraf as a service by posting to rifgraf.heroku.com, or grab the source and host your own.
Created by Adam Wiggins, released under the MIT license. Built with Sinatra, Sequel, Ruby, and amCharts.