Adding Gridlines to Your Map (Tableau and Alteryx)

by Irene Diomi

In this blog, we will cover how to create gridlines for your map and use it in Tableau. To build your map, we will need a ESRI shapefile, that we will input in Alteryx, we will add the gridlines with the Make Grid in Alteryx then we will finally connect our shapefile to Tableau.

Why a shapefile?

"A shapefile stores nontopological geometry and attribute information for the spatial features in a data set. The geometry for a feature is stored as a shape comprising a set of vector coordinates"  (ESRI White Paper, 1998).

For this tutorial I have used a shapefile (.shp). After inputting the shapefile in Alteryx, the view looks like this:

The file I used shows the different Borough for New York City.

Adding a Browse tool, we can see the shape for each Boroughs

If you want to combine the boroughs together, you can do so with the Summarize tool

Combining all the Borough together to get one shape

After using the Summarize tool, we are left with one record as each borough has been combined into one shape.

To create Gridlines, the Make Grid is used. The Make Grid is customizable, we are able to pick the size of each square we want for our gridlines.

Adding Make Grid creates Gridlines on your Map

With 5 miles Grid size our view looks like this:

I want to use this Grid for my data on Rats sightings in NYC.

I added to the Canvas, data about rat sightings, my data includes borough name, Longitude and Latitude. The Longitude and Latitude are used to create points for my map.

The Create Points tool give us centroid as seen above, we can match our gridline with our rat sighting data so that we have the count of rat seen per grid. We use the Spatial Match tool to match the two spatial files. The Spatial Match tool has 2 anchors, T (Target) and U (Universe). We join our Make Gird tool to the Universe anchor and the Create Points tool to the Target anchor.

After the Spatial Match, we use another Summarize tool to get the count of rats sightings for each grid. Our last step in Alteryx, is to output the work as a shapefile.

Finally, we can connect our shapefile to Tableau. And this is the view we get :

I hope this tutorial was useful, feel free to reach out if you need more help.