Painting with Data

August 4, 2017

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

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:


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. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


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)