Interactive MDS visualisation using D3
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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.
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.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.