Interactive MDS visualisation using D3

[This article was first published on dahtah » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
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.

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.


To leave a comment for the author, please follow the link and comment on their blog: dahtah » R.

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.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)