htt

Software & Programme

Drawing Tool for Tableau

von
Quantum GIS

We often get asked about using custom mapping features and how Tableau can deal with customer’s custom mapping requirements when implementing location intelligence BI solutions.
Previously we have achieved this by a number of methods including using desktop geographic information systems like QGIS up to rolling out geospatial information servers with the custom mapping layers served as a web mapping service to be consumed by Tableau. All of these solutions aren’t exactly light on effort so I was very excited to learn from a colleague of a new tool from Interworks, the Drawing Tool for Tableau.

Here is a rundown of the feature promised by this new tool…

  • draw points, paths or polygons
  • draw on your own images or maps
  • helpful features like snap to existing points
  • double-click to finish one shape and start another one
  • one-click copy to your clipboard for pasting into excel or text files
  • custom scales on background images

It looks potentially useful and time saving so I decided to it out by dividing up the areas of the industrial estate where Insight Dimensions are based and trying to plot this in a Tableau workbook.

These are the polygons I want to represent in Tableau and as you can see they don’t exist in any digital format that I could find so had to nip out to get a picture to work from:

Bild1

Ok, so first step is to start the web app.

This didn’t actually work for me in Firefox so I tried IE and in IE it seems to work fine. I then chose Maps, entered Hulb in Location and chose an appropriate zoom level, like so.

Bild2

Now we can draw our polygons by clicking around the shapes we need. The website is a little light on instructions and by default you will draw points on the map rather than shapes with individual points within that shape. To draw a polygon you need to select from here11 either the rectangle 12 function or the shape function 13 . This will then present the data as single shapes with multiple data points like so:

Bild3

After much clicking this is what my finished polygons looked like:

Bild4

Tip: Change zoom level or move map around don’t forget to select Stop Drawing 14 to allow you to move without setting polygon points.

You can then export to csv and use directly in Tableau. Here’s how in case you are new to polygons.

1. Open the csv file by opening Text File in Tableau here:
Bild52. You will need to drag the Point and Shape data to Dimensions:
Bild63. Now double click on Latitude then on Longitude to get then on the map. One point will show, the average of the coordinates.
4. Change the mark type to Polygon and drag Shape to Path and point to Color:
Bild75. Et voila! The polygons are in the map and ready for use in reporting.
Bild8

If you want to import the polygon data into an Excel workbook to make it easier to work with or to add to other data then you can import the text file into Excel. However if you are not using UK or US region options then you will have problems with the coordinates (I am using German where decimal points are a thousand separator and commas are the decimal separator). If you are in a similar situation then I found the following trick for working with Latitude and Longitude coordinates.

1. Save coordinates as csv. Open a new Excel sheet and select Data> Import From Text.
2. In wizard choose Delimited and Comma as the delimiter.
3. In the next step change the Latitude and Longitude column data type from General to Text like so:
Bild94. Once the data is imported into Excel then use the SUBSITUTE function in Excel like this:
Bild105. Right click on the column and change the format to number if you want Tableau to automatically recognize the columns as latitude and Longitude. You can now use it in Tableau.

This tool does allow for quick and easy demonstrations of polygon usage in Tableau however the lack of correction tools did make it a little fiddly to use compared with a dedicated desktop tool like QGIS. It is ideal for demonstrating and testing polygons for Tableau but for more complex tasks I would use QGIS.

Richard Raistrick

Über den Autor 

BA-Universität Sheffield. 12 Jahre Erfahrung als Enterprise Software Technical Consultant/Ingenieur bei einem der weltweit größten Softwareunternehmen. Seit Anfang 2014 bei der Insight Dimension GmbH als Consultant / Entwickler tätig.

Drawing Tool for Tableau Reviewed by on .

We often get asked about using custom mapping features and how Tableau can deal with customer’s custom mapping requirements when implementing location intelligence BI solutions.

Hinterlasse einen Kommentar

Your email address will not be published. Required fields are marked ( required )