« | Main | »

September 03, 2011

plot is a bookmarklet to correlate arbitrary functions to data using google's trends correlate draw. It's catered towards trigonometric ones (since they make nice pretty curves) and translates the input so that a function -- such as Math.sin(y) -- has the origin in the middle-left of the actual graph and domain of .

To use, first you input a function:

gtd1.png

then, that function will be plotted on the canvas:

gtd2.png

then, you can correlate it to some data:

gtd3.png

This is the permalink for the sin-ish function before -- there's some strange behavior towards the end of the graph, so it's not really sin, but I don't think anyone really cares.

A gist of this code is here: gist.github.com/1191495.

This has been tested on sin(y) and cos(y).

Posted by jeff at September 3, 2011 01:26 PM