Painting with Data

[This article was first published on Revolutions, 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.

The accidental aRt tumblr (mentioned here a few years ago) continues to provide a steady stream of images that wouldn’t look out of place in a modern art gallery, but which in fact are data visualizations (mostly attempted in R), gone wrong. (Here’s a typical recent entry.) But now, Giora Simchoni has taken this concept to the next level by writing an R package that deliberately creates works of art

The kandinsky package (available now on Github) takes any dataset as input, and creates an image reminiscent of the work of abstract painter Wassily Kandinsky. The data points are used to position Kandinsky’s typical motifs — rectangles, circles, waves and such — on a digital canvas. And since every data set is different, the resulting “work” is therefore unique. Here, for example, Len Kiefer takes a break from his usual visualizations of economic data to create a Kandinsky plot of mortgage rates:

Andrew Clark used the same package to generate Kandinsky plots from baseball data. With a simple Shiny app, you can choose a player represented in the Lahman package and use their data to create a chart on the fly:

Sammysosa

Behind the scenes, the kandinsky package uses the grid graphics system in R to lay out the elements of the “painting” on a blank canvas. The grid system isn’t often used directly, but it’s what’s behind many of the modern graphics systems in R (notably, lattice and ggplot2). If you’re thinking about creating an entirely new visualization in R, as Giora Simchoni has done here, the grid package is well worth looking into. You can learn a lot about its capabilities in the blog post linked below.

Giora Simchoni: Data Paintings (The Kandinsky Package)

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

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)