Here’s a sneak peak into upcoming visualisation work. I’ve been working a bit on MDS (Multi-dimensional scaling), a classical technique for visualising distance data. Classical MDS is useful, but interactive MDS is *much* more useful. Using D3, a Javascript visualisation framework, it’s relatively easy to make interactive MDS plots. This example shows how basic interaction can be used to show the approximation inherent in a MDS representation. See here for the interactive version, or click on the image below.

european_cities_mds

The sourcecode is available as well, but seeing as I’m new to Javascript it’s not exactly a model of clarity and elegance. All the computational hard work is done in R rather than D3, and was adapted from the “cmdscale” documentation. Most things are still a lot easier to do in R than in D3. Fortunately there’s Shiny, and the R + Shiny + D3 toolchain looks very promising. More on that in a future post.

About these ads