How To: Density Maps Using Hexbins in Tableau

5/20/2016 Matt Chambers 5 Comments




After my previous post, I continued to work with some alternative methods in Tableau.  I decided to look at using hexbins instead.  This is a bit more complex than rounding the lat/long but not much.  Let's see how it's done.

1. Create a parameter called Ratio.  This will let you control the binning.  The higher the ratio the more bins in the view.

2. Create the hexbins for Latitude and Longitude.




3. Drag Hexlong and Hexlat to Columns and Rows Respectively.  Set your ratio to the binning level that you prefer.  In this case I've used 2.5.  Hide the headers as well.



4. Pull the worksheet into the dashboard and size appropriately.  I used 1184 by 660 in this view.

That's all there is to it. Feel free to download the workbook and see how it is done or comment below for questions.


5 comments:

  1. Nice share! I'm getting more involved in Tableau and this looks like a great solution to the county/city boundary obstacle for geo views.

    Thanks!

    -Andrew

    ReplyDelete
    Replies
    1. Glad you liked it. Welcome to the community!

      Delete
  2. Hi Matt, when using hexbins for geography in Tableau it's important to account for the curvature of the earth, see http://www.theinformationlab.co.uk/2015/05/12/hexbins-in-tableau/ by Chris Love for details. Cheers!

    ReplyDelete
  3. Nice and informative post, Tableau is new to me and I am already getting my interest in it. Will like to read more about it. Keep posting

    ReplyDelete
  4. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in TECHNOLOGY , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on TECHNOLOGY. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Saurabh Srivastava
    MaxMunus
    E-mail: saurabh@maxmunus.com
    Skype id: saurabhmaxmunus
    Ph:+91 8553576305 / 080 - 41103383
    http://www.maxmunus.com/


    ReplyDelete