After answering a number of political questions, it creates a hexagonal scatterplot showing where you fall on a spectrum of populist to not populist and left to right (liberal to conservative). For example.

I recently came across a brilliant data visualization by The Guardian that seeks to help you understand

The Guardian: How Populist Are You?

The Guardian: How Populist Are You?

I loved this chart, primarily because, unlike a normal scatterplot, it bins the data so you can see the hotspots of people who took the quiz. This provides some insight immediately, such as the fact that a much higher proportion of the people tend to be more left-leaning and somewhere in the middle of the populism spectrum.

So, considering how well the chart worked in this scenario, I wanted to see if I could build it in Tableau.

Note: If you’re not interested in all the technical details of how to build this, then feel free to skip to the end of this post where I share a plug-and-play template.

Conceptually, we’d have to do the following:

Move every other row in ½ of our bin size in order to create the tessellation.

which shows the location of pitches thrown in Major League Baseball last year. I chose this data set for a couple of reasons. First, it should show some clear hotspots. Second, the X and Y axes represent spatial distances, so one unit on the X axis is the same as one unit on the Y axis. Other than that, the data itself isn’t particularly important and I won’t be focusing too much on analyzing it.

Note: For simplicity, I’ve named the my X axis measureand my Y axis measure

I wanted to make the bin size a user-configurable option, so I started by creating aparameter.

. (Quick note: This technique is quite powerful as it opens up a number of capabilities that can’t be done with normal bins, so be sure to check it out.) Theformula Joe provides is:

BYO Bin technique developed by Joe Mako, which I learned by way of Jonathan Drummey

Because my bin size is configurable, I can’t use Tableau bins and needed to bin the measures via a calculated field. So I used a

Applied to my data, it looks like this:

But, as noted previously, we need to adjust the X coordinate so that every other row is pushed in by ½ of a bin, which will allow use to tessellate our hexagons. So, we’re going to throw out the above

calculation. Instead, we’ll first make some adjustments to the

to handle or “indentation” based on whether we’re on an odd or even row (based on