Video | Tableau | Data visualisation

Hexbins & Mapping in Tableau: Tutorial HD with CC June 2016

Let me show you how to bin thousands of data points into neat hexagons, on a scatter plot and on a map.

Watch on YouTube
  • Hexbinning requires Tableau version 9 onwards and uses the HEXBINX and HEXBINY functions, which both need to be defined together for the X and Y axes (or lat and long)
  • After creating the hexbin calculations, move them from measures to dimensions, then convert them to continuous when placing them on the visualisation
  • Use a parameter multiplied into and divided out of the calculation to control bin density on the fly without rebuilding calculations
  • For maps, treat latitude and longitude as your X and Y values, and assign the duplicated reference fields the correct geographic roles
  • Hexagons are used because they are the most compact way to fit shapes side by side, the same reason honeycombs occur in nature

Tim shows how to bin thousands of overlapping data points into neat hexagon groupings in Tableau, both on a plain X/Y scatter plot and on a geographical map using latitude and longitude.

Works with any dataset that has two numeric axes (X and Y, or latitude and longitude) with dense, overlapping points that are hard to read individually. Requires Tableau version 9 or later, since that's when the HEXBINX and HEXBINY functions were introduced.

The Breakdown
  1. Why hexbin instead of raw points 0:00

    When you have thousands of points on a scatter plot or map, individual marks overlap and obscure the real density. Hexbinning groups nearby points into a single shape representing its neighbours, making density patterns visible.

  2. Create the HEXBINX and HEXBINY calculations 1:48

    Type HEXBIN into the calculation editor to find HEXBINX and HEXBINY — you need both together, one for each axis you're binning on (X and Y, or longitude and latitude for maps).

  3. Move the calculations to dimensions and make them continuous 3:41

    After building the two calculations, drag them from the measures pane up into dimensions — this is a required step, not optional. When you place them on the view, convert both to continuous, otherwise the hexbin shapes won't render correctly.

  4. Add a parameter to control bin density 5:31

    Build a numeric parameter (e.g. a range like 0 to 10 with small increments) and edit the hexbin calculations to multiply the X/Y or lat/long values by the parameter, then divide the whole result by the same parameter. This lets you loosen or tighten the grouping live, without rewriting the calculation each time.

  5. Verify and tune with number of records 8:22

    Drop Number of Records onto label or size to see how many raw points sit inside each hexagon — a useful check that the binning is genuinely working and a way to visually tune the parameter until the density looks right.

  6. Swap in custom hexagon shapes 9:24

    By default the bins render as circles; switch the mark type to shape and load a hexagon shape to get the classic tessellated hex-grid look. Hexagons are used because they're the most compact way to tile shapes side by side with no gaps — the same reason honeycombs form in nature — though circles or other shapes still work if you prefer.

  7. Apply the same technique to a map 11:10

    For geographic data, treat longitude as your X and latitude as your Y. Duplicate the lat/long fields to create a second reference pair, then explicitly assign those duplicated fields the correct geographic role (latitude/longitude) so Tableau recognises them for mapping.

  8. Watch the axis assignment carefully 14:40

    It's easy to swap latitude and longitude or mis-assign the geographic role, which throws your hexagons onto completely the wrong part of the map — double-check this assignment if your bins appear in the wrong region.

Worth Knowing
  • Hexbinning only works in Tableau version 9 onwards, since HEXBINX/HEXBINY didn't exist before that.
  • Projecting hexagons onto a curved map introduces geographic distortion, since the world isn't flat — Tim references a Tableau research paper on this if you want the technical detail.
  • Swapping latitude and longitude, or assigning the wrong geographic role to the duplicated fields, is a very easy mistake that sends your hexagons to the wrong part of the map.
  • You don't have to use hexagon shapes — circles work too, though hexagons tile without gaps, which is why they're the conventional choice.
Use It When

Reach for this when a scatter plot or point map is so dense with overlapping marks that you can't read where the real concentrations are, and you want a cleaner, tunable view of spatial or bivariate density.

How this Rollup was made provenance & method

A Rollup is drafted by AI from the video's transcript, then reviewed and edited by Tim. Everything used to produce this one is listed below — the model, the exact prompt, and the source video — so the process is transparent and reproducible.

Transcription
On-device — NVIDIA Parakeet v3 for recent videos, OpenAI Whisper large-v3 for earlier ones. The transcript never leaves the machine or gets published.
Drafting
Claude Sonnet 5 in the cloud, from that transcript.
Prompt
The exact Rollup prompt (v2) — the full system prompt, unedited.
Source video
Watch on YouTube
Drafted
5 July 2026 at 09:38
Reviewed & edited
5 July 2026 at 09:41 · by Tim Ngwena

Model + prompt + video is everything you'd need to recreate a Rollup like this yourself. The one thing we don't share is the transcript.

Rights. The video and its transcript are the property of TN Media Ltd. Unauthorised use or download is prohibited. © TN Media Ltd.