Data Driven Images with Tableau

This week one of my students asked me how to recreate the ascii style pig found in Russell Spangler’s ‘Whatcha Know About Bacon’ viz. My initial reaction was that deconstructing Spangler vizzes usually hurts my brain, yet as an old school gammer, ascii text seemed within my grasp. It turns out that I figured it out (with some help) and have made it easy for anyone to replicate in less than 5 MINUTES!


I started down the path, but couldn’t quite figure out the next steps to take after I found a web utility to convert an image to ascii. So I reach out to Russell on Twitter for some inspiration, and his guidance suggested that I was very close. I added a conversion step using an Excel template found here: ASCII ART to DATA TABLE

As you can see, Russell was more than will to help with his ‘pig grid.’

Start by visiting and uploading a small picture. White backgrounds make the image pop the best.

After you generate the image, click get the CODE HTML or Text and copy everything in the second box.ascii6

This step shows the original image, to ascii image, to where you paste it into my Excel Template. This template is setup to take images that are less than 150 characters wide and less than 150 lines tall. If you need more space, you can just copy all of the formulas to a larger area.ascii7

From here you can copy the table from the ‘ASCII Data’ tab and paste it into Tableau. If you expanded the rows or columns on the previous sheet, the formulas need to extend down to row # (Height x Width)+1.ascii8

After you paste in the data, you need to make the Rows and Columns dimensions.

Here is a simple layout displaying the discrete rows & columns with value on the text card. You can also opt to exclude the NULLS from value if you start to mess around with color.ascii9

As I started to play around more with the options, I found that using circles and varying size, while putting the value on color came up with some cool looking results. The values are discrete, but when I apply a gradient palette, it gives the image depth. Here I also had to exclude NULLS form value.ascii_example

With a little practice, you can now create similar images in minutes. So go forth and be creative!