Shp files or shapefiles as they are generally called, are files that contain geocoded information and hence allow us to analyse spatial data. Tableau Desktop version 10.2 and beyond allows users to connect to shape files. This opens up a lot of possibilities for geographical data analyses in Tableau. Let us see how to work with shp files in Tableau.
Loading shp files to Tableau
We will use the Australian Local Government Area (LGA) data for this tutorial. You can get the data from the Australian Bureau of Statistics website. Click here and download the Local Government Areas -2024 Shapefile.

This data contains the geographical boundaries of LGAs in Australia with their names, codes and area in sq km. Save the file locally. Make sure to extract it, if it is zipped. Shp files look a bit different from other file types. They are accompanied by a whole bunch of other files. Please do not delete them!
Open an instance of Tableau Desktop version 10.2 or beyond and go to the Data Connections and click on Spatial file. Go to the folder where you have saved the above files and click on the shp file to open.

Next, go to a new Sheet, drag the generated longitude to columns and latitude to rows. Notice a field called geometry in this dataset. Drag geometry on the visual to see the LGAs in Australia.

Disaggregating the Data
Even though the map of Australia is no visible with the LGA boundaries, if you hover over the map, the LGA boundaries are still aggregated, which means if you click on just one polygon, the entire map of Australia gets selected. We need to disaggregate this data in order to anayse it further. For this, we need to bring a row level detail onto the view. In this case, it’s the LGA code. Thus, drag the field called LGA Code 22 to the Detail marks card. And now if you click on a specific LGA, it gets selected while the rest of the country does not.

Creating visuals by adding more fields
Drag the Areasqkm field on to the colour Marks card to view the LGAs coloured by their size. This way, we can use shp files in Tableau to analyse spatial data.


