<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/painting-with-data/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2017/08/kandinsky.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>The <a rel="nofollow" href="http://accidental-art.tumblr.com/" target="_blank">accidental aRt tumblr</a> (<a rel="nofollow" href="http://blog.revolutionanalytics.com/2014/07/accidental-art.html" target="_blank">mentioned here</a> 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 <a rel="nofollow" href="http://accidental-art.tumblr.com/post/154992318030/trying-to-fit-all-the-information-on-one-plot" target="_blank">recent entry</a>.) But now, Giora Simchoni has taken this concept to the next level by writing an <a rel="nofollow" href="http://giorasimchoni.com/2017/07/30/2017-07-30-data-paintings-the-kandinsky-package/" target="_blank">R package that deliberately creates works of art</a>. </p>
<p>The <a rel="nofollow" href="https://github.com/gsimchoni/kandinsky" target="_blank">kandinsky package</a> (available now on Github) takes any dataset as input, and creates an image reminiscent of the work of abstract painter <a rel="nofollow" href="https://en.wikipedia.org/wiki/Wassily_Kandinsky" target="_blank">Wassily Kandinsky</a>. 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 <a rel="nofollow" href="http://lenkiefer.com/" target="_blank">visualizations of economic data</a> to create a <a rel="nofollow" href="http://lenkiefer.com/2017/07/27/kandinsky" target="_blank">Kandinsky plot of mortgage rates</a>:</p>
<blockquote class="twitter-tweet" data-lang="en">
<p dir="ltr" lang="en">was going to make my usual time series gif of mortgage rates, but I decided to tween Kandinsky instead. sequence of rates 4 weeks at a time <a rel="nofollow" href="https://t.co/mMnOxGxVcW" target="_blank">pic.twitter.com/mMnOxGxVcW</a></p>
<p>— Leonard Kiefer (@lenkiefer) <a rel="nofollow" href="https://twitter.com/lenkiefer/status/890720132879835137" target="_blank">July 27, 2017</a></p></blockquote>
<p></p>
<p>Andrew Clark used the same package to <a rel="nofollow" href="https://www.mytinyshinys.com/2017/07/27/kandinsky/" target="_blank">generate Kandinsky plots from baseball data</a>. With a simple Shiny app, you can choose a player represented in the <a rel="nofollow" href="http://mran.microsoft.com/package/Lahman/" target="_blank">Lahman package</a> and use their data to create a chart on the fly:</p>
<p><a rel="nofollow" href="https://www.mytinyshinys.com/2017/07/27/kandinsky/" target="_blank"><img border="0" alt="Sammysosa" title="Sammysosa" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b7c912a101970b-800wi"></a></p>
<p>Behind the scenes, the kandinsky package uses the <a rel="nofollow" href="https://stat.ethz.ch/R-manual/R-devel/library/grid/doc/grid.pdf" target="_blank">grid graphics system</a> 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 <a rel="nofollow" href="https://www.rdocumentation.org/packages/grid/versions/3.4.1?tap_a=5644-dce66f&tap_s=10907-287229" target="_blank">grid package</a> is well worth looking into. You can learn a lot about its capabilities in the blog post linked below.</p>
<p>Giora Simchoni: <a rel="nofollow" href="http://giorasimchoni.com/2017/07/30/2017-07-30-data-paintings-the-kandinsky-package/" target="_blank">Data Paintings (The Kandinsky Package)</a></p>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.revolutionanalytics.com/2017/08/kandinsky.html"> Revolutions</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/Iw6QOktZwKI" height="1"></a></div>