Do you know what pointillism is? It’s a technique of painting with small distinct dots to create an image. And you can do this with Tableau! Well, sort of.
I made this series of pointillistic representations of well known photographs and paintings for Tableau’s Viz As Art contest. Be sure to click on the “photoart” tab to view my collection of 10 images, as well at the “revolution” tab.
I used Processing to extract each pixel’s coordinate and colour value, convert RGB colour values to greyscale and output the table to a text file. The Processing code is listed below. Note that I am yet to find a way to properly highlight Processing syntax in WordPress, let me know if you use a plugin that understands Processing. If you are wondering about the RGB to grayscale conversion step, read this Wikipedia article.
[code language=”java”]
PImage photo;
PrintWriter textFile;
//enter name of file you want to process (no extension)
String file = “Obama”;
void setup() {
//load image
photo = loadImage(file + “.png”);
//initialize output text file
textFile = createWriter(“txtfiles/” + file + “.txt”);
for (int column = 0; column < photo.width; column++) {
for (int row = 0; row < photo.height; row++) {
//extract pixel’s colour value
color c = photo.pixels[row*photo.width+column];
//convert RGB values to grayscale
int g = round(red(c)*0.2126+green(c)*0.7152+blue(c)*0.0722);
//print output to console (optional)
println(column + “,” + row + “,” + g);
//save output to text file
textFile.println(column + “,” + row + “,” + g);
textFile.flush();
exit();
}
}
}
[/code]
I imported the resulting text files to Tableau and plotted them as scatterplots, varying the symbol Size by the reverse of grayscale values (I wanted larger symbols for darker areas or lower grayscale values). I also binned the grayscale values and applied a 4 colour palette to points.
This technique works best with clean, contrasty images with easily discernible shapes. You may try to experiment with different sizes of original images, but I find that lower resolution gives better results, so before conversion to text I resampled all my source images to 100×100 pixel size. That results in a viz that has abstract quality, as opposed to being a close replication of the original.
Whether you need to inform, persuade, or prove an important point with data, as an experienced Tableau consultant, I can help you do that with effective and elegant visualizations.
Hello – I wanted to get in touch with you and inquire about using your lovely image of the Birth of Venus you created in Tableau for a poster. I am an American lecturer teaching in the Cinema and Digital Media department at an English speaking University in Izmir, Turkey. We’d love to use this image on a poster that will promote the end of year exhibition. These printed posters to be displayed in the University later this spring. The exhibition is to display student work and does not generate any revenue. Please let me know if this is a possibility or not. Thank you in advance for your time.