top of page

Blog

Search
Writer's pictureJade @dataunjaded

How to create Quadrant Hex Maps

Hex maps are a very popular chart because they force each state to be the same size, allowing viewers to better compare the magnitude and differences in the data across states.



Data Prep:


Download quadrant hex map data and images here


First you need to add the four Quadrant shapes to Tableau desktop. Do this by going on your computer to Documents folder --> My Tableau Repository --> Shapes, create a new folder, drag and drop jpgs. More info here.


Second, you need to update the Quadrant Hex Map data file with the four specific categories you are analyzing and assign them each to a Quadrant Number. Change values in the highlighted column D. These category names MUST be the same as the category names in your primary data source file. In my example 1 = light, 2 = circle, 3 = disk, 4 = diamond, because those are the four main UFO Shapes in my original dataset.


In Tableau Desktop:


(borrowing a little wording from Sir Viz A lot’s post on his original Hex Map How To)


Connect to Quadrant Hex Map file (which in this case will be your Secondary Data Source)

  • Drag “Row” to rows

  • Drag “Column” to columns

  • Drag State to Detail

  • Right click the Row Axis Header, select Edit Axis, check the Reversed axis box

  • Right click Quadrant Number and Convert to Dimension

  • Drag Quadrant Number to Shape on the Marks Card. Apply the four quadrant shapes you added to your Tableau Repository Shape folder

Connect to your Primary data source

  • Click Data on the Top Menu Bar --> New Data Source (Example here is UFO Data file for Tableau)

  • In order to size the quadrants by a certain measure, you need to add relationships between the Primary and Quadrant Hex Map data sources

  • Click Data in the Top Menu Bar --> Edit Relationships

  • Select the Primary (UFO Data file) and Secondary (Quadrant Hex Map) data sources

  • Add custom relationships: State Abbreviation (in the primary) relates to Abbreviation (in the quadrant hex map) AND your particular four categories, in this example UFO Shape (primary) relates to UFO Shape Hex (quadrant hex map)

  • Be sure the link icons in the data pane are red/not broken

Designing

  • Drag UFO Shape (from Primary file) to Color on the Marks card. Set colors as desired. Adjust transparency as desired (75-85% is a good range). Using Category Pill (UFO Shape) from the primary data source allows for Null values, or instances where states do not have data, to be a different color in the hex map views

  • Drag your desired Measure (in this example Number of Sightings/Records) to Size on the Marks card

  • Some of the states now may appear really small. We want to get them all relatively the same size in the view for comparison. Right click the Number of Sightings card and select Edit Sizes. Adjust as necessary

  • Drag Abbreviation (from Quadrant Hex Map file) to Label on the Marks card. Allow labels to overlap over marks, and set alignment to Middle, Center. Using the Abbreviation from the Quadrant Hex file will allow any states not represented in your primary data set to still have a label

  • Finally, hide axis headers, remove column and row dividers, adjust height and width, etc. as desired for your viz

...and BAM

165 views

Recent Posts

See All

Comments


bottom of page