How to Use ArcGIS Data, Features and Basemaps in Tableau

Here at Esri we talk with our customers on a regular basis, and one of the things we’ve learned is how many ArcGIS power users also use Tableau for business intelligence, slicing and dicing data, and visualizing patterns. We think that’s great! Tableau and ArcGIS are complementary for many kinds of analysis.

In Tableau, one of the data visualizations you can make is a map. The product ships with pre-defined spatial datasets so you can associate data with common administrative boundaries (zip code, county, state), or place names.  There’s also a background map based on OpenStreetMap data. The resulting combination of background map and single symbol or filled map layer can be used in Tableau Dashboards and Stories.

In organizations using both ArcGIS and Tableau, we’re beginning to hear questions like:

  • “How can I use the authoritative spatial data I manage in ArcGIS in Tableau?” For example, police districts or sales territories.
  • “How do I get different ArcGIS basemaps into Tableau?”
  • “How can I mash up my Tableau analytics with additional geographic layers?”

We wanted to give you some ideas for leveraging ArcGIS content in Tableau.  Our own Josh Venman from Esri Australia and Suzanne Foss created a tutorial for how to use ArcGIS and Tableau more together. It covers how to import features from geodatabases, bring in tiled map services  and get multiple layers into a background map in Tableau. Without further ado, check it out below or here.

We hope this helps you! If you have any questions or feedback on this, please leave a comment below.


How To Use ArcGIS Maps as Tableau Background Map

The recommended workflow to use ArcGIS maps as the background map in Tableau is to publish ArcGIS base data and optionally, overlays of interest to ArcGIS Server with WMS enabled.

I. Required Software:
a. ArcGIS for Desktop 10.0 or later
b. ArcGIS for Server 10.0 or later
c. Sample Basemap: ArcGIS_SampleCanvasBasemap.zip

Screenshot of Canvas basemap in ArcMap

II. ArcGIS Steps:
a. Extract ArcGIS_SampleCanvasBasemap.zip to a location accessible to ArcGIS Server
b. Open CanvasBasemap_v10.mxd in ArcMap
c. Add any desired overlays to the map and symbolize them

i. For best performance, set overlays and base layers to same projection

d. Save the map with a new name that reflects the changes, and publish the map to ArcGIS Server

i. Ensure that WMS is selected as a capability on the service

f. Optionally, the map can be converted to a tile package and published to ArcGIS Server asa tiled map service. (See next section for use of a tiled map service in Tableau)

III. Tableau Steps:
a. Open Tableau
b. Go to Tableau’s menu item Map > Background Maps > WMS Servers…
c. Click the Add… button and paste the WMS endpoint URL from your ArcGIS service:
http:///arcgis/services//MapServer/WMSServer?request=GetCapabilities&service=WMS (Click the Close button)
d. Go to Tableau’s menu item Map > Background Maps > select your WMS service
e. Go to Tableau’s menu item Map > Map Options > set options for layer visibility and washout in the background map
f. The connection to the WMS service will persist when you save the Tableau workbook

IV. Additional Resources
a. How-to Video


ArcGIS Tiled Map as Tableau Background Map

The recommended workflow to use ArcGIS tiled map as a background map in Tableau is simply to add it in Tableau.

An ArcGIS tiled map could be (1) a tiled service coming directly from your own ArcGIS Server, or (3) a tiled service hosted in your ArcGIS Online organization subscription.

To use a basemap that is delivered from a server, Tableau offers the option of referencing that basemap through a ‘TMS’ file. The server is required to meet the following criteria:

  • Maps are returned as a collection of tiles
  • Tiles are in Web Mercator projection
  • Tiles can be addressed by URL using the same numbering scheme as common web mapping

The format for a TMS file is:

<?xml version="1.0" encoding="utf-8"?>
<mapsource inline="false" version="8.1">
<connection class="OpenStreetMap" port="80" server="<server-url>" url-format="<url-format>" />
<layers>
<layer display-name=’Base’ name=’base’ show-ui=’false’ type=’features’ request-string=’/’ />
</layers>
</mapsource>

Additional parameters that can be included to control the appearance of the background map are documented in a Tableau Knowledge Base article.

I. Required Software:
a. ArcGIS Online (organizational subscription) OR b. ArcGIS for Server 10.0 or later

II. Tableau Steps:
a. Create a TMS file referencing your service of choice
b. Place the TMS file in the correct directory for Tableau to recognize it:

i. Tableau Desktop (Mac): /Users//Documents/My Tableau Repository/Mapsources
ii. Tableau Desktop (Windows): C:\Users\\Documents\My Tableau Repository\Mapsources
iii. Tableau Server: C:\Program Files\Tableau\Tableau Server\\vizqlserver\mapsources

c. Open Tableau
d. Go to Tableau’s menu item Map > Background Map > select your new map in the list (Note: you may see a warning about not being able to render the map if your tiled map service does not cover all of the scales required by your data in Tableau)
e. Go to Tableau’s menu item Map > Map Options > check on your custom map layer
f. Proceed to work with the Tableau interface with the tiled background map

III. Additional Resources
a. Sample TMS Files:

1. GA Aus Topography
2. Percent Karst

b. How-to Video


How to Use ArcGIS Features as a Tableau Marker Layer

The recommended workflow to use ArcGIS data as a marker layer in Tableau is to transform ArcGIS features into a Tableau-supported format.

A geoprocessing model wraps all the steps required to transform an ArcGIS polygon feature class into a Tableau-ready table in to the same database as the original feature class’s parent geodatabase. This model can be run through Python on a scheduled basis to keep the Tableau-ready data in sync.

Steps to use ArcGIS data as a marker layer in Tableau

In the example above the end result is a non-spatial table in a SQL Server Database. However, Tableau can connect to any of the databases that ArcGIS supports for enterprise geodatabases.

I. Required Software:

a. ArcGIS for Desktop 10.0 or higher b. Custom Geoprocessing Tools: Tableau Tools (10.0, 10.1/.2, or 10.3)

II. ArcGIS Steps:

a. Open ArcMap and add the ArcGIS data to be transformed to a Tableau-ready table b. Open the ArcCatalog pane and browse to the location of Tableau Tools_.tbx c. Expand the toolbox and run the tool Polygon to Tableau Point Table

i. Use your ArcGIS data as input
ii. Indicate a distance tolerance for polygon simplification
iii. Specify the coordinate system of the input polygons and any necessary geographic transformations
iv. Specify an output location (can be in an enterprise geodatabase or an external file)
v. Note: if ArcGIS data changes, this step will need to be repeated

III. Tableau Steps
a. Open Tableau
b. Use the standard Connect to Data tool to connect to the newly created ‘polygon’ table from the ArcGIS process. c. Use this new table as the source of data for a Polygon marker type in Tableau. d. After connecting to the database and selecting the Tableau-ready table, the steps are:

i. Drag PointId to Path
ii. Drag PolygonId to Detail
iii. Double-click on Latitude
iv. Double-click on Longitude

That is all that is required to draw the basic map.

ArcGIS features in Tableau map

e. At this point, any measure can be dropped on to the Color area to render the map based on that value.
f. In the example below, the data is a set of Medicare Local boundaries in Australia. Medicare Local Name has been dragged from the Dimensions area on to the Color area.

Medicare local boundaries Australia ArcGIS Tableau

g. Once created this map sheet is no different from one created using Tableau’s built-in mapping and it can be used in Tableau Dashboard and Story sheets.

IV. Additional Resources
a. ArcGIS Tool Download
b. How-to Video

Have a question or feedback? Please comment below.

This entry was posted in Local Government, Location Analytics, Mapping. Bookmark the permalink.

Leave a Reply

25 Comments

  1. Mike says:

    Good Stuff!!! I’ve created a similar model that’s a little cleaner and more efficient for client work. You have to be careful with smal polygons within larger polygons that share the same dimension Name or identifier. Path Order gets a little thrown off and looks like a spider web.

  2. vish says:

    I just built a utility to help with the above too. Might be helpful to some folks.
    https://viswaug.wordpress.com/2015/06/29/tableaushapemaker-adding-custom-shapes-to-tableau-maps/

  3. Kevin M says:

    I downloaded your World Topo and World Imagery tms files. I put them in the correct directory for Tableau. They do not show up in the Background Maps menu. When I try to import the TMS file as a WMS server connection, it does an error: “Error parsing XML at line 16 of the file: duplicate attribute”.
    Line 16:
    This is the only line with the “enabled” attr in the file. If I delete that line and restart Tableau, the service shows up in the Background Maps menu, but it does not display as a background in the map.

    • Josh Venman says:

      Hi Kevin – sorry to hear you had a problem with the TMS files. Just checking, what platform are you using Tableau on – Windows or OSx? And what folder did you put the files in? With the WMS side of things, a WMS connection needs a connection to an OGC WMS Web Service rather than the tiled map service type that the TMS files reference. If you’re using ArcGIS for Server, then that service type can be easily exposed by enabling the WMS capability on the service in ArcGIS Server Manager.

      • Daniel Z says:

        Hi Josh I’m facing same problem described by Kevin. I’m using Tableau on Windows and I put the file directly where it should be: Users\\Documents\My Tableau Repository\Mapsources and same error occur. I tried to build .tms file as explained a service as explained:

        but when I try to open it in Tableau it gives an error: the online map couldn’t be loaded… any suggestion ?

  4. Josh Venman says:

    A couple of people reported problems using the TMS files that reference Esri base maps so I have uploaded new versions which I have tested in Tableau Desktop 9.0 on Windows. Please leave a comment and let us know if you have any issues with them.

  5. sookyenc says:

    Hi Josh,
    I’ve created a WMS Service in ArcGIS Server. But when I added the URL in Tableau (Maps–>Background Maps–>WMS Server), it said “Cannot connect to the WMS Server”. I tested the WMS Service in ArcMap and it worked fine. Wonder why Tableau cannot connect when added the URL. Appreciate your input. Thanks.

    • Josh Venman says:

      When you see the “Cannot connect to the WMS Server” message, if you click the Show Details button, what do you see? – that should give you more information about the issue Tableau had communicating with the service.

  6. jreichlin says:

    Hello Josh, when I run the model the table is created but there are no records created. The field names show and nothing else. Thanks Joe
    Here is the message:

    Executing (Simplify Polygon): SimplifyPolygon MN_FirstNet_Coverage_Objective_Baseline in_memory\SimplePolys_SimplifyPolygon POINT_REMOVE “1 Miles” “1 SquareMiles” NO_CHECK KEEP_COLLAPSED_POINTS
    Start Time: Thu Sep 10 16:14:49 2015
    Simplifying polygons…
    Simplifying polygons…
    Lines were collapsed to points, 85381 point(s) written to the point output.
    Succeeded at Thu Sep 10 16:15:44 2015 (Elapsed Time: 54.76 seconds)
    Executing (Project to WSG_1984): Project in_memory\SimplePolys_SimplifyPolygon C:\Users\jreichlin\Documents\ArcGIS\scratch.gdb\SimplePolys_SimplifyPolygon_ GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]] WGS_1984_(ITRF00)_To_NAD_1983 PROJCS['USA_Contiguous_Albers_Equal_Area_Conic',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Albers'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-96.0],PARAMETER['Standard_Parallel_1',29.5],PARAMETER['Standard_Parallel_2',45.5],PARAMETER['Latitude_Of_Origin',37.5],UNIT['Meter',1.0]] NO_PRESERVE_SHAPE #
    Start Time: Thu Sep 10 16:15:44 2015
    Succeeded at Thu Sep 10 16:15:46 2015 (Elapsed Time: 1.69 seconds)
    Executing (Multipart To Singlepart): MultipartToSinglepart C:\Users\jreichlin\Documents\ArcGIS\scratch.gdb\SimplePolys_SimplifyPolygon_ in_memory\Polys_SinglePart
    Start Time: Thu Sep 10 16:15:46 2015
    WARNING 000117: Warning empty output generated.
    Succeeded at Thu Sep 10 16:15:46 2015 (Elapsed Time: 0.48 seconds)
    Executing (Feature Vertices To Points): FeatureVerticesToPoints in_memory\Polys_SinglePart in_memory\Polys_AsPoints ALL
    Start Time: Thu Sep 10 16:15:47 2015
    WARNING 000117: Warning empty output generated.
    Succeeded at Thu Sep 10 16:15:47 2015 (Elapsed Time: 0.01 seconds)
    Executing (Add Geometry Attributes): AddGeometryAttributes in_memory\Polys_AsPoints POINT_X_Y_Z_M # # #
    Start Time: Thu Sep 10 16:15:47 2015
    Running script AddGeometryAttributes…
    Completed script AddGeometryAttributes…
    Succeeded at Thu Sep 10 16:15:50 2015 (Elapsed Time: 3.33 seconds)
    Executing (Change POINT_X to Lon): AlterField in_memory\Polys_AsPoints POINT_X Longitude Longitude # 8 NON_NULLABLE false
    Start Time: Thu Sep 10 16:15:50 2015
    Succeeded at Thu Sep 10 16:15:53 2015 (Elapsed Time: 3.25 seconds)
    Executing (Change POINT_Y to Lat): AlterField in_memory\Polys_AsPoints POINT_Y Latitude Latitude # 8 NON_NULLABLE false
    Start Time: Thu Sep 10 16:15:53 2015
    Succeeded at Thu Sep 10 16:15:53 2015 (Elapsed Time: 0.00 seconds)
    Executing (Change ORIG_FID to PolygonId): AlterField in_memory\Polys_AsPoints ORIG_FID PolygonId PolygonId # 4 NON_NULLABLE false
    Start Time: Thu Sep 10 16:15:53 2015
    Succeeded at Thu Sep 10 16:15:53 2015 (Elapsed Time: 0.00 seconds)
    Executing (Add Field): AddField in_memory\Polys_AsPoints PointId TEXT # # # # NULLABLE NON_REQUIRED #
    Start Time: Thu Sep 10 16:15:53 2015
    Adding PointId to in_memory\Polys_AsPoints…
    Succeeded at Thu Sep 10 16:15:53 2015 (Elapsed Time: 0.00 seconds)
    Executing (Generate Unique PointId): CalculateField in_memory\Polys_AsPoints PointId autoIncrement() PYTHON_9.3 “rec=0\ndef autoIncrement():\n global rec\n pStart = 1 #adjust start value, if req’d \n pInterval = 1 #adjust interval value, if req’d\n if (rec == 0): \n rec = pStart \n else: \n rec = rec + pInterval \n return rec”
    Start Time: Thu Sep 10 16:15:53 2015
    WARNING 000405: No records within table
    Succeeded at Thu Sep 10 16:15:53 2015 (Elapsed Time: 0.00 seconds)
    Executing (Copy Rows): CopyRows in_memory\Polys_AsPoints C:\temp\Misc2\FirstNet_Baseline.gdb\MN_test DEFAULTS
    Start Time: Thu Sep 10 16:15:53 2015
    WARNING 000117: Warning empty output generated.
    Succeeded at Thu Sep 10 16:15:54 2015 (Elapsed Time: 1.09 seconds)

  7. denverbiz says:

    Josh –
    I downloaded the Tableau Tools and gpk via the link provided above. When I try to unpack the gpk, I get a message saying:

    Invalid Package — The package is not valid. Check with the package publisher for an updated package.

    I’m running ArcMap 10.2.0.3348 for Desktop, Advanced License.
    I don’t have all the tools included in the model and was hoping they might be in the gpk. Not sure why some of the tools aren’t showing up in my toolboxes (ex: Add Geometry Attributes).

    Thanks if you can advise.
    Katherine

    • Josh Venman says:

      Hi Katherine – apologies for the delay in responding – I missed your comment. The GPK that’s available for download is for 10.3 so that probably explains the issue if you’re using 10.2. The tool itself is also in the download in specific TBX files for versions going back to 10.0. Can you access the one called “Tableau Tools_101-102.tbx”?

      Cheers,
      Josh

  8. panosdraxis says:

    Hi.
    In arcgis version 10.1 the tool is not working. It cannot find the tools:
    Add geometry Attributes
    Change POINT_X to Lon
    Change POINT_Y to Lat
    Change ORIG_FID to PolygonId

    Any suggestions?

    • Josh Venman says:

      Hi – apologies for the confusion – you’re correct – 10.1 is going back to a point where the geoprocessing tool landscape was different. Looking back at the 10.1 Help, the ability to rename a field had just been added to the ArcMap UI, but wasn’t yet a GP tool. In my model, I used the Alter Field (Data Management) (renamed to Change POINT_X to Lon for readability). In fact, you could do away with these field renaming steps. The only reason I added them was because Tableau knows that “Lo”n is a likely candidate field for a geographic role, whereas it doesn’t see POINT_X the same way – you’d just have to tell Tableau specifically that this field has geometry in it. With that in mind, you could solve the three rename challenges by just removing them. Something else you might want to explore is this https://www.arcgis.com/home/item.html?id=b678ced224c94e7d8291478df39364eb which was a sample Rename Field GP tool published around the 10.1 timeframe. I haven’t tried it – but maybe worth looking at.

      With the Add geometry Attributes tool I was using Add Geometry Attributes (Data Management) , I think you can replace that with the 10.1 equivalent which had a slightly different name – Add XY Coordinates (Data Management).

      Regards,
      Josh

  9. emacdougall says:

    What license level do I need to run the Tableau Tools? Or do I need to have a specific extension? I have the basic license level for ArcDesktop 10.3 and every time I run the tools I get an error that says “You do not have the necessary license to execute the selected tool.”

    • Josh Venman says:

      Hi – out of the 9 GP tools used in the PolygonsToTableauPoints model, most (7) of them will work with Basic, but there are two that require higher license levels. The Simplify Polygon tool requires Standard, and the Feature Vertices to Points tool requires Advanced. I used the Simplify Polygon tool to minimise the number of vertices that have to be converted to points for consumption by Tableau to keep the size down, and the performance up – if your data is simple, then you may be able to miss this step.

      Converting feature vertices to points is something you have to do, but if you can find an different way of achieving the same thing, then that’s fine – the sequence of tools I selected was driven by a wish to make it as a simple as possible. It doesn’t have to be that specific tool doing the job though. Here’s a summary of the GP tools and license levels required.

      Simplify Polygon – Standard
      Project – Basic
      Multipart to Singlepart – Basic
      Feature Vertices to Points – Advanced
      Add Geometry Attributes – Basic
      Alter Field – Basic
      Add Field – Basic
      Calculate Field – Basic
      Copy Rows – Basic

      Regards,
      Josh

  10. nliu says:

    If the feature class is stored as SQL server spatial type and in WGS84 coordinate system, it is possible to create a view directly against the shape column for Tableau to consume, without having to make a copy of the data. It is a complex view and involves XML type, cross apply, ranking etc. Still exploring but so far seems working well.

  11. scot7557 says:

    Are the Sample TMS Files no longer available? When I try to access them from box, I get “This shared file or folder link has been removed.”

  12. sasakiyo says:

    Are the Sample TMS Files and How-to Video no longer available? When I try to access them from box, I get “This shared file or folder link has been removed.”

  13. nathanluedtke says:

    Same as the above couple of comments – it looks like the ArcGIS tool has been removed? Is it being updated for Tableau 10? I’m going to need to use this shortly so please let the community know why the tool was removed and if it is going to be brought back.

  14. spatialqueries says:

    None of the links on this page seem to be working. I’m interested in downloading the tool and viewing the ‘how to’ video. Can anyone assist?

  15. Josh Venman says:

    Links to the GP tool and how to videos working again.

  16. Kent says:

    With Tableau 10.2 you can direct connect to Shapefiles, KML, MapInfo tables and GeoJSON files directly.

    More details here:
    https://www.tableau.com/about/blog/2017/2/tackle-your-geospatial-analysis-ease-tableau-102-66018

    Cheers, Kent

  17. emilyhueni says:

    Hi, I downloaded the example tms files that you supplied (GA Aus Topography and Percent Karst) and went to import them into tableau, however it does not work for me… instead I get a message saying ‘This Tableau Map Source (tms) does not identify a WMS or mapbox server. Map server type is ‘OpenStreetMap’.’ Any idea what I could be doing wrong?