Subject Area: Design
Level of complexity: Intermediate
Approximate Time to complete: 2-4 Hours
Companion Workbook (twbx): EffectiveMappingFromGISSource.twbx
Additional Resources on the web:
- http://www.tableau.com/learn/tutorials/on-demand/basic-mapping
- http://www.tableau.com/learn/tutorials/on-demand/advanced-mapping-techniques
- http://www.tableau.com/learn/tutorials/on-demand/polygon-maps
- http://www.tableau.com/learn/tutorials/on-demand/custom-geocoding
Tableau has built-in mapping locations for many common types of geography, including country, state, city, et cetera. However, there are numerous cases where you will want to give Tableau your latitudes and longitudes manually.
Section One - What type of data do you need? Points, Paths and Polygons
Mapping specific points, paths, and polygons in Tableau requires some basic information in the data. Specifically, latitude and longitude are needed to define our vertices, and point order values to order the paths and create the vectors. Each point needs (vertex) is defined by a coordinate point (latitude and longitude).
If you are working from a source GIS file, such as an ARCGIS .shp (shapefile) the polygons created when converting to use in Tableau could contain hundreds of thousands and even millions of points to be connected, depending on the scale and detail of your map. Effective strategies for keeping mapping data a reasonable size must be employed.
What type of data do you need? There are three basic types: Points, Paths and Polygons. Let's look at examples of each below
Here is a great example of geo points displayed in Tableau:
Source Data:
Output in Tableau:
Paths in Tableau
Source Data - notice two rows for each vertice on a path:
Output in Tableau:
Polygons in Tableau
Source Data - notice multiple rows for each polygon:
Output in Tableau:
Section Two - Where can I get it? (Tableau doesn't do .SHP files, now what?)
"So this is great! But how do I get this lat/long data? All I have is an ArcGIS or ESRI .SHP file and it doesn't work with Tableau!!"
"I just have street addresses, but I want to map specific locations"
Free (but technical):
- http://community.tableau.com/thread/131690
- http://venkat-echo.blogspot.com.au/2013/09/tableau-convert-esri-shapes-into.html
Easy (but not free):
- Licensed ArcGIS users: http://kb.tableau.com/articles/knowledgebase/tableau-polygons-arcgis-shapefiles
- Alteryx: http://www.alteryx.com/
Other places you can get lat / long for your data:
- R – ggmap library: http://www.dataplusscience.com/Geocoding%20in%20Tableau%20using%20R.html
- Python: pygeocoder library: http://code.xster.net/pygeocoder/wiki/Home
- Google Maps: http://kb.tableau.com/articles/knowledgebase/mapping-datapoints-google-maps