Animated gridded paths in R

The previous post on gridded data animation was fairly basic; very cool in its potential, but anticlimactic in isolation. Here I am ignoring the data altogether. Instead, I focus on simulating paths along the borders of the grid cells for a cool visual effect.

As you can imagine, this actually requires more computational resources in terms of the amount of simulated lines and path progression than there are cells in the raster layer. I found this to be notably more challenging that the last gridded data animation. One thing that is common to both examples, however, is judicious use of randomness. Randomness is our friend. Semi-randomness is our very best friend.

I am working on improvements that will make this flow a bit more nicely. The higher resolution paths (which would not be considered high resolution at all in many contexts) are simply traversed too quickly to fully appreciate, even if it still looks neat. I don’t have to go to very high resolutions before running into resource allocation issues, or at least having to be very patient with my computer. I don’t have code to share now, but similar techniques will be employed in a series of upcoming posts, and also related to previous posts [1, 2, 3, 4]. There will be much to bring together. Eventually I’ll have some toy example code to share to get the basic ideas across, but it will be limiting, as significant processing power is required to do this on a bigger scale.

As a statistician I like to make use of randomness in visualizations like this. Although we generally think of randomness as, well, just random, I think semi-random processes can be quite beautiful. I wonder whether this is because we live in a world where this is basically something we see all the time; non-random processes layered with noise. It’s familiar territory. As a statistical programmer I have to combine judicious use of randomness and various statistical processes with similarly tactful computational strategies, as in the case of this visualization.

The overlap of these two realms is an exciting place to be. Math, statistics, and theory come first, but at the end of the day we still need to be able to show something that people pay attention too. But lest I encourage the cowboys out there, I should turn that around as well. It’s important to be practical, without being a data maverick.

This entry was posted by Matt Leonawicz.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: