Tableau Joining 2; Intersecting Spatial Boogaloo

Joining spatial data that intersects is easier in Alteryx than it is in Tableau (my opinion, see for yourself). However, if you really want to do it this is how you can.

Step 1: Check data. Make sure that both of your datasets have geo-spatial values. This can be a shape (e.g. a map of a country or state), a line (a bus route) or any kind of shape or point that can be put on a map. It can also be a pair of latitude and longitude values (as you will soon see).

Step 2: Importing datasets. Import both datasets into Tableau. You need to do this in the same way that you would do any regular join. Import your first dataset, and double click on the logical table to open up a physical table (see gif below)

Step 3: Joining the tables. Drag in the other table containing your other spatial data. This should automatically create a join between the two.

Step 4: Join conditions. Click on the join that has appeared (if it hasn't already opened). You should see drop down menus for both tables labelled 'Join Clauses'. This is where you select your spatial field. However, if you have latitude and longitude fields there is no way you can enter both in one join clause.

Step 4.5: Lat and Long. To make latitude and longitude values join on intersects with another datasets spatial data, you have to make a point out of the two values. you do this by; selection 'create join calculation' at the bottom of the join clause dropdown and entering this equation - 'Makepoint([Latitude],[Longitude]) This creates a spatial point out of the two values.

Step 5: Join Condition. In-between the two clause dropdowns there is the join condition menu. Here you want to select 'Intersects'. This will only join the spatial data that intersects, and will bin the rest.

Step 6: Congrats! You've joined by spatial data intersection, and now you can work out geo-spatial values that intersect.

Author:
Tom Stinson
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab