viz

It's been over a year since I created viz, but until today I hadn't provided any examples or documentation of how to use it. Even still, the documentation is rather lacking, but today I mirrored my repository on github, and created a few examples of how to draw stuff with the canvas, and invoke viz from the command line.

The basic concept behind viz is pretty simple, especially if you are used to using Unix tools and pipes. If you understand sed, you understand viz. With sed, you iterate over the records in your input stream, and apply some text manipulation to each of them in turn. With viz, you also operate on each record in the stream, but instead of applying a textual operation, a record painting function is applied. The output is not another stream of bytes, but a canvas. Essentially this means you can easily create data-driven animations by writing a simple JavaScript function.

If you are also used to using tools like less, then you understand the type of interactions viz provides. Since the output of viz can't be piped to less, viz provides in itself the capability to step back and forth through the input stream. viz accomplishes this using checkpoints, which I won't describe in detail here, but its enough to know that if you don't need to step backwards through your stream, you can turn off checkpointing and viz can handle essentially infinite amounts of data.

Another feature of viz is that you can save your data-driven animations as movies to share with the world. For instance, this movie was created from the deterministic circles example:

(download)

Of course, watching the movie doesn't compare to the authentic viz experience. The resolution of viz is far superior, and you can step through the input record by record. viz even provides the ability to jump to a particular record or perform exact match searches on the stream.

Unfortunately, not much has been added to viz in the last year, since I've been busy hacking on Disco. Nonetheless, it has already proven an extremely useful tool for me in exploring data, and I hope it might be for others as well.