All rights reserved. © 2009 Tableau Software Inc. Advanced Mapping Techniques Austin Dahl, Dirk Karis, Robert Morton Tableau Software
All rights reserved. © 2009 Tableau Software Inc. Agenda Big Picture Review of 4.0 Features Custom Geocoding Geographic Hierarchies Creating new role: Regions Augmenting an existing role: UK Postal Codes Adding a new hierarchy: FIPS Codes WMS – Web Mapping Service Leveraging Geospatial Capabilities of Databases
All rights reserved. © 2009 Tableau Software Inc. Mapping Service Geocoding Big Picture Place Name Latitude, Longitude Map
All rights reserved. © 2009 Tableau Software Inc. Mapping Service Geocoding Big Picture, Example Washington 47.35° N, ° W Map
All rights reserved. © 2009 Tableau Software Inc. Mapping Service Geocoding + Data Scatter Plot Map
All rights reserved. © 2009 Tableau Software Inc. Demo Basics
All rights reserved. © 2009 Tableau Software Inc. Review of 4.0 Features Basic Mapping and Challenges Creation Double click on any geocoded field to get a map Use Show Me Resolving Ambiguity LOD Best Practices Put full hierarchy on LOD e.g. Country, State, Zip 2008 Conference talk by Austin Dahl has lots more
All rights reserved. © 2009 Tableau Software Inc. Agenda Big Picture Review of 4.0 Features Custom Geocoding Geographic Hierarchies Creating new role: Regions Augmenting an existing role: UK Postal Codes Adding a new hierarchy: FIPS Codes WMS – Web Mapping Service Leveraging Geospatial Capabilities of Databases
All rights reserved. © 2009 Tableau Software Inc. Mapping Service Geocoding Custom Geocoding Place Name Latitude, Longitude Map
All rights reserved. © 2009 Tableau Software Inc. Geographic Hierarchies Countries have States States have Counties Counties have Cities Cities have Neighborhoods Neighborhoods have Buildings Buildings have Rooms Rooms have Chairs … Countries have Area Codes Area Codes have Exchanges Exchanges have Numbers
All rights reserved. © 2009 Tableau Software Inc. Built In Geocoding Existing Hierarchies Country (Name, FIPS 10, ISO , ISO 3166) CMSA Area Code State (Name Abbreviation) County Zip Code
All rights reserved. © 2009 Tableau Software Inc. Hierarchy Examples C:\Program Files\Tableau\Tableau 5.0\Local\data\ZipCode.tds Country State Zip Code C:\Program Files\Tableau\Tableau 5.0\Local\data\AreaCode.tds Country Area Code
All rights reserved. © 2009 Tableau Software Inc. Custom Geocoding What you can do Add new hierarchies e.g. Sales Regions, Airports, Store Locations Add new sub-levels to existing hierarchies e.g. Cities Add new locations to an existing level e.g. UK Postal Codes What you cannot do Put existing levels under your new levels Add additional alternate names to existing levels Change the location for an existing entry But, you can duplicate existing levels and do all of the above
All rights reserved. © 2009 Tableau Software Inc. What You Need CSV File with: Unique ID (no duplicates) Optional: IDs of containing levels (a.k.a. foreign key) Latitude Longitude Optional: Schema.ini file IDs should be Text Even numeric fields like zip code Latitude and Longitude should be Double See us/library/ms709353(VS.85).aspx for details on Schema.inihttp://msdn.microsoft.com/en- us/library/ms709353(VS.85).aspx
All rights reserved. © 2009 Tableau Software Inc. Simple Geocoding Little League World Series
All rights reserved. © 2009 Tableau Software Inc. LLWS Region Encoding CSV File
All rights reserved. © 2009 Tableau Software Inc. Two Locations SELECT [LLWS#csv].[Runner-Up Region] AS [Runner-Up Region], [LLWS#csv].[Runner-Up Score] AS [Runner-Up Score], [LLWS#csv].[Winner Region] AS [Winner Region], [LLWS#csv].[Winner Score] AS [Winner Score], [LLWS#csv].[Year] AS [Year] FROM [LLWS#csv]
All rights reserved. © 2009 Tableau Software Inc. Two Locations SELECT [LLWS#csv].[Runner-Up Region] AS [Region], [LLWS#csv].[Runner-Up Score] AS [Score], [LLWS#csv].[Year] AS [Year], 'Runner-Up' AS [Winner - Runner-Up] FROM [LLWS#csv] UNION SELECT [LLWS#csv].[Winner Region] AS [Region], [LLWS#csv].[Winner Score] AS [Score], [LLWS#csv].[Year] AS [Year], 'Winner' AS [Winner - Runner-Up] FROM [LLWS#csv]
All rights reserved. © 2009 Tableau Software Inc. Augmenting the Built In Geocoding UK Postal Codes
All rights reserved. © 2009 Tableau Software Inc. UK Postal Codes Clean Up
All rights reserved. © 2009 Tableau Software Inc. UK Postal Codes Schema.ini
All rights reserved. © 2009 Tableau Software Inc. Adding Geocoding Hierarchies FIPS Codes Desired Hierarchy Country (Name, FIPS 10) FIPS State (Abbreviation, 2 Digits) FIPS County (3 Digits, 5 Digits)
All rights reserved. © 2009 Tableau Software Inc. Adding Geocoding Hierarchies FIPS Geocoding Files FIPS CountyFIPS State
All rights reserved. © 2009 Tableau Software Inc. Adding Geocoding Hierarchies FIPS Schema.ini
All rights reserved. © 2009 Tableau Software Inc. Custom Geocoding Best Practices Clean the data Remove blank or duplicate rows Check the data types Format for leading zeros if needed Use Schema.ini to enforce types and column names Store in a common directory Use subfolders for different locations or roles Keep your CSV files Order the fields with the most readable name first Use Tableau to connect to it as a sanity check
All rights reserved. © 2009 Tableau Software Inc. Sharing Your Custom Geocoding One-off: Save to TWBX and send Import from TWBX Group Wide One person imports everything Distribute My Tableau Repository\Local Data (Advanced) It is possible to have TDS files in Local Data reference in-house databases On Tableau Server Publish and custom geocoding will get sent if needed.
All rights reserved. © 2009 Tableau Software Inc. Agenda Big Picture Review of 4.0 Features Custom Geocoding Geographic Hierarchies Creating new role: Regions Augmenting an existing role: UK Postal Codes Adding a new hierarchy: FIPS Codes WMS – Web Mapping Service Leveraging Geospatial Capabilities of Databases
All rights reserved. © 2009 Tableau Software Inc. Geocoding Mapping Service WMS Place Name Latitude, Longitude Map
All rights reserved. © 2009 Tableau Software Inc. WMS Basics 1 2 3
All rights reserved. © 2009 Tableau Software Inc. WMS Examples
All rights reserved. © 2009 Tableau Software Inc. WMS Examples
All rights reserved. © 2009 Tableau Software Inc. WMS Examples bin/mapserv?map=/data/umn/germany/germany.map&&
All rights reserved. © 2009 Tableau Software Inc. Agenda Big Picture Review of 4.0 Features Custom Geocoding Geographic Hierarchies Creating new role: Regions Augmenting an existing role: UK Postal Codes Adding a new hierarchy: FIPS Codes WMS – Web Mapping Service Leveraging Geospatial Capabilities of Databases
All rights reserved. © 2009 Tableau Software Inc. Tapping Into Geospatial Databases Contains Intersection Distance
All rights reserved. © 2009 Tableau Software Inc. Summary Custom Geocoding Add your locations, augment Tableau locations WMS In house via ArcGIS and others; numerous public servers Different layers than the Tableau built-in Geospatial Databases Calculations of Distance, Intersection, Containment Geographic Types
All rights reserved. © 2009 Tableau Software Inc. Questions ? Austin Dirk Robert
All rights reserved. © 2009 Tableau Software Inc. Resources Geospatial Data Sets National Atlas - NOAA - Upload Shapefiles to SQL Server 2008 Shape2SQL - Spatial-Tools.aspxhttp:// Spatial-Tools.aspx Edit and Manipulate Shapefiles OpenJUMP -