custom data map

custom data map, updated 10/10/23, 12:28 AM

About Jack Zheng

Faculty of IT at Kennesaw.edu

Tag Cloud

Custom Data Maps
IT 7113 Data Visualization
http://idi.kennesaw.edu/it7113/
J.G. Zheng
Fall 2023
This lecture notes is hosted at https://www.edocr.com/v/npapy5k4/jgzheng/mapping-location-based-visualization
Overview
We will introduce three types of custom maps.
1. Custom geo map
2. Custom contextual map
3. Tile grid map
1. Custom Geo Map
• Standard (default) geo map
– Use of GIS software or capabilities
– Common geo location data can be recognized by the
software without special settings: city, state, zip, country, etc.
– A geo location related field needs to set as a geolocation data type
– Standard geo areas can be grouped as a derived geo location area
• Custom geo maps include:
– Non-standard geo areas that are not recognized and handled
directly (lakes, nature preserves, parking space, etc.)
– Custom geo areas for specific or temporary situations or events,
such as natural phenomenon (rain, fire, flood, etc.), war, etc.
– Non-standard geo locations that are not or difficult to be associated
with a precise commonly identifiable name (building, rural place,
river location, highway segment, etc.)
– Detailed geo locations that are not automatically recognized by the
GIS software and need some special settings. For example, Tableau
cannot deal with address/street level of details directly, see
https://kb.tableau.com/articles/howto/address-level-mapping.
Built-in geo location data types in
Tableau - see more info at
https://help.tableau.com/current/pro/
desktop/en-us/maps_data.htm
Custom Geo Map Techniques
• Custom geo encoding
– A user provides point-based or polygon-based geo
coordinates from a separate source
– Still use the software provided geo base map as
background
• Static geo image
– use of a static geo spatial image as background (not
software provided)
– provide custom geo or x/y coordinates
• See examples at
https://public.tableau.com/app/profile/jack.zhen
g/viz/KSUparking/PointsonGeoMap
Custom Geo Encoding
• Where to get geo coordinates of specific locations?
– https://cbistudio.interworks.com (recommended) - learn to use tool
https://interworks.com/blog/2022/01/24/introducing-cbi-studio-from-
interworks/
– Geo encoding services, such as Google Geo API,
https://www.findlatitudeandlongitude.com/batch-geocode/
• How to provide custom geo coordinates in Tableau - two ways
– Data blend (see examples and next a few slides):
• Provide with your data source directly in one table or blend from two tables
– Custom geocoding source (not covered in this class)

Importing separately https://help.tableau.com/current/pro/desktop/en-
us/custom_geocoding.htm
• Use spatial file (Shapefile) as data source
https://help.tableau.com/current/pro/desktop/en-us/maps_shapefiles.htm
– Refer to https://help.tableau.com/current/pro/desktop/en-
us/maps_customgeocode_datablend.htm
Point Based Geo Encoding
• Point based
shapeId shapeLabel
longitude
latitude
peak rate parking type
0Lot A
-84.51876092
33.939726
95%faculty
1Lot B
-84.51817083 33.94019775
90%student
2Lot C
-84.52028441 33.94132815
77%guest
3Lot D
-84.51837468 33.94131035
90%faculty
Points (shapes in the
table) are mapped on the
map.
Set each location (point)
with a pair of longitude
and latitude coordinates.
Data Blend/Join for Points
• For a point-based map, data measures may be put in the same
one table, or create a one-to-one relationship between two tables
• One table – see previous slide
• Two tables
– One table just for geo location data; one table for measure data;
then one-to-one relationship between the two tables.
– Refer to https://help.tableau.com/current/pro/desktop/en-
us/maps_customgeocode_ex_datablend.htm
shapeId shapeLabel
longitude
latitude
peak rate parking type
0Lot A
-84.51876092
33.939726
95%faculty
1Lot B
-84.51817083 33.94019775
90%student
2Lot C
-84.52028441 33.94132815
77%guest
Table join based on the
street address column.
Area/Polygon Based Geo Encoding
• Drawing custom polygons
shapeId shapeLabel pointId
longitude
latitude
0Lot A
0 -84.51796698
33.9409383
0Lot A
1 -84.51868582 33.94054667
0Lot A
2
-84.5181601 33.93979899
0Lot A
3 -84.51724815
33.9398702
0Lot A
4 -84.51709795 33.94071578
1Lot B
0
-84.5201664 33.94186398
1Lot B
1 -84.52133584 33.94173047
1Lot B
2 -84.52119636 33.94110742
1Lot B
3 -84.51985526 33.94130323
2Lot C
0 -84.52347088 33.93755593
2Lot C
1 -84.52350306 33.93663021
2Lot C
2 -84.52244091 33.93663021
2Lot C
3 -84.52264476 33.93752033
Set each location area (shape) with a set of
points (starting from 0); each point has a pair
of longitude and latitude coordinates. The
software will connect these points by order to
forma a area/polygon.
Areas (shapes with
multiple points in the
table) are mapped as
polygons on the map.
Data Blend/Join for Areas
• For polygon-based map, blend or join two
tables
– one table just for geo location point/polygon data
– one table for measure data
– then one-to-many relationship between the two
tables.
shapeId shapeLabel pointId longitude
latitude
0Lot A
0
-84.51796698
33.9409383
0Lot A
1
-84.51868582
33.94054667
0Lot A
2
-84.5181601
33.93979899
0Lot A
3
-84.51724815
33.9398702
0Lot A
4
-84.51709795
33.94071578
1Lot B
0
-84.5201664
33.94186398
1Lot B
1
-84.52133584
33.94173047
1Lot B
2
-84.52119636
33.94110742
1Lot B
3
-84.51985526
33.94130323
2Lot C
0
-84.52347088
33.93755593
2Lot C
1
-84.52350306
33.93663021
2Lot C
2
-84.52244091
33.93663021
2Lot C
3
-84.52264476
33.93752033
Table join based on Parking
Lot and shapeLabel columns.
Static Geo Image
• Static geo image is just one image of a geo region, without
capability of zooming and panning, and all kinds of map layers.
• The image is placed as the background image of the map.
• Then, points and polygons can be placed on the image, just like
geo maps.
• There are two ways of setting position coordinates
1. Relative geo codes – refer to
https://help.tableau.com/current/pro/desktop/en-
us/bkimages_maps.htm (recommend the second option using
https://www.openstreetmap.org)
2. Custom X/Y coordinates (similar as context map in the next
section) – refer to https://help.tableau.com/current/pro/desktop/en-
us/bkimages_coordinates.htm
• The process of setting the data source (either as points or areas)
is the same as the previous methods (slide 6 and 7)
2. Contextual Map
• Contextual maps do not use geo location data and the
area is smaller or confined in a specific place.
• The context is closely associated with a particular type of
place or activity
• Examples of local contextual spaces
– Space/seating utilization
• Building, mall, park, stadium
(https://public.tableau.com/profile/stanke#!/vizhome/HackyourMNTw
insTickets/TicketHack), hospital, classroom, airplane, parking
– Playing court/field
• Especially used in sports, like tennis, basketball, soccer, etc.
• https://www.espn.com/nba/story/_/id/27587041/the-absolute-best-
shooters-nba-decade
– Space or layout of smaller objects like keyboards, screens,
etc.
– Open air space
Contextual Data Maps used in Space
Management
https://betterwith.office.com/OKViz-plot-your-data-on-any-image-
with-SynopticPanel
https://synoptic.design
https://www.facilityquest.com/occupancy-utilization-studies/
Room/space utilization – using
color (heat map) for coding
utilization rate. Commonly used
by campus, office building, mall,
hospital etc.,
Seating management and
insights – commonly used
for airlines, theaters,
stadiums, and other events.
Contextual Data Maps used in Sports
https://public.tableau.com/en-
us/s/gallery/seasons-nba-shots
https://www.informationisbeautifulawards.com/sho
wcase/4115-2018-fifa-world-cup-match-explorer
https://www.espn.com/tennis/story/_/id/16954858/how-andy-murray-took-
milos-raonic-become-wimbledon-champion
This is a typical
illustrational diagram of
basketball half court used
as the base map.
This base map looks real, but it
is computer generated tennis
court – still considered to be
illustrational. But it can be real
tennis court based.
Open Space in the Air
• The “background” is open air (or space that is relative to some
kind of reference, such as player standing position, height, etc.)
http://public.tableau.com/profile/datavizard#!/vizhom
e/MLBBatterHotColdZones/BatterHotCold
https://www.vox.com/a/maps-explain-world-cup#list-25
https://www.bbc.com/sport/
football/44641247
Contextual Maps used in Other Places
https://www.patrick-wied.at/projects/heatmap-
keyboard/
https://tableauandbehold.co
m/2015/04/13/creating-
custom-polygons-on-a-
background-image/
Contextual base maps
• Contextual base maps can have two styles
– more realistic, based on actual photo or image
– abstract diagrams (illustrational map)
Photos and Image as Contextual Base Maps
• Real world imaging/photo, or even
sight
https://www.esri.com/about/newsroom/publications/wheren
ext/nexttech-ai-and-location-intelligence-in-business/
https://tableauandbehold.co
m/2015/04/13/creating-
custom-polygons-on-a-
background-image/
A photo of a
store shelf as
the base map.
https://www.patrick-wied.at/projects/heatmap-
keyboard/
https://www.espn.com/tennis/story/_/id/16954858/how-andy-murray-took-
milos-raonic-become-wimbledon-champion
This base map looks real,
but it is computer generated
tennis court – still
considered to be
illustrational. But it can be
real tennis court based.
This parking lot
base map is from
satellite image.
Illustrational Diagram or Map

Illustrational maps simplify
map details, and use
symbols to represent map
objects
– the goal is to illustrate
relative positioning rather
than accuracy.

In this example, the real-
world roads are not displayed
based on geo maps and
coordinates, but rather as a
representative illustration
http://fatalities.safer63and881.com/
#highway
Illustrational Base Map/Diagram
https://betterwith.office.com/OKViz-plot-your-data-on-any-image-
with-SynopticPanel
https://synoptic.design
https://www.facilityquest.com/occupancy-utilization-studies/
This is a typical
illustrational diagram of
floor plan used as the
base map.
This is a typical
illustrational diagram of
seat plan used as the
base map.
Build Custom Contextual Map
• We can use the same technique as the static geo image solution,
but with custom X/Y coordinates
– Use a static background image
https://help.tableau.com/current/pro/desktop/en-us/bkimages.htm
– Find Background Image Coordinates
https://help.tableau.com/current/pro/desktop/en-
us/bkimages_coordinates.htm
• Use a tool for finding coordinates!!
– https://cbistudio.interworks.com
– Learn to use tool
https://interworks.com/blog/2022/01/24/introducing-cbi-studio-from-
interworks/
• Example
– https://public.tableau.com/app/profile/jack.zheng/viz/tennis_1696852
5406280/ServeLandingPoints
3. Tile Grid Map
• Tile grid maps abstractly use simplified symbols (tiles) to
represent geo regions
– just like geo charts, but even more abstract and less accurate.
– Purely representational, least accurate
• Common use cases
– Eliminate the Alaska effect on US maps
– Places are of irregular shape and different sizes
– Provide a more modern look
• Not ideal when
– Geographical precision is important
https://fivethirtyeight.com/features/
where-your-state-gets-its-money/
Key readings about tiled grid map:
• http://blog.apps.npr.org/2015/05/11/hex-tile-maps.html
• https://www.forumone.com/insights/blog/good-data-
visualization-practice-tile-grid-maps-0/
Why Tiles?
• Map project distortion
– https://en.wikipedia.org/wiki/Map_projection
– https://observablehq.com/collection/@d3/d3-geo-projection
• Tiny states are hard to be visualized
Alaska effect in
Mercator
projection
States are now
represented in
shapes with
equal sizes
https://www.tableau.com/about/blog/2017/1/viz-whiz-
hex-tile-maps-64713
Tile Grid Map Variations
http://bfongdata.blogspot.com/2015/11/periodic-table-map.html
http://blog.apps.npr.org/2015/05/11/hex-tile-maps.html
https://public.tableau.com/ap
p/profile/datavizard/viz/Energ
yinAmerica/Energy
Tile Grid Map Variations
http://aftertheflood.co/proj
ects/london-squared-map
https://www.dailykos.com/stories/2013/7/9/1220
127/-Daily-Kos-Elections-2012-election-results-
by-congressional-and-legislative-districts
https://twitter.com/katiepark/stat
us/598139293509492736
Tiled Cartogram
https://www.nytimes.com/elections/2012/ratings/electoral-map.html
Basic Technique
• Creating a tile grid map is similar to scattered plot
– Determine the grid size (rows and columns); use X/Y
axes to set the grid.
– Use dots in the grid to represent a region; arrange dots
with specific location (row/column) in the grid.
– Present the dots as a consistent/uniform shape.
– Associate measures to dots - encoded using color/value
or other visual properties.
• Refer to https://www.tableau.com/blog/viz-whiz-hex-
tile-maps-64713 by Kevin Taylor
• See examples at
https://public.tableau.com/app/profile/jack.zheng/viz/t
ilegridmap_16968521771450/SuperStore
More Techniques

Using built-in shape
– Brittany Fong http://bfongdata.blogspot.com/2015/11/periodic-table-map.html or https://www.tableau.com/blog/how-make-
tile-grid-maps-tableau

Using custom shape from an image
– Matt Chambers https://www.sirvizalot.com/2015/11/hex-tile-maps-in-tableau.html
– Kevin Taylor https://www.tableau.com/blog/viz-whiz-hex-tile-maps-64713

Using polygon
– Rody Zakovich http://www.datatableauandme.com/2017/12/polygon-hex-map-in-tableau.html
– Note: polygons cannot display data values on the mark.

Using spatial file (Shapefile)

Joshua Milligan https://vizpainter.com/hex-map-spatial-file/ and a video by Anthony Smoak
https://anthonysmoak.com/2018/03/11/create-a-hex-map-in-tableau-the-easy-way/

Using calculated field without data blending
– Shaun Davis https://www.phdata.io/blog/create-a-hex-map-in-tableau-without-data-blending/
Brittany Fong
(Tiled Map)
Matt Chambers
(Hex Tiled Map
using image)
Kevin Taylor (a
more detailed
tutorial)
Rody Zakovich
(using Polygon)
Joshua Milligan
(using Spatial File)
Chain of inspirations
Shaun Davis
(using calculated
field)
Which style should I choose?
• Point or area?
• Realistic map image or representational
diagram?
• Real geo/location area shape or uniform
abstract shape?
Learning Resources
• Custom map
– https://www.superdatascience.com/blogs/art-using-tableau-custom-maps
• Build custom contextual map in Tableau:
– Use background image (base map) https://help.tableau.com/current/pro/desktop/en-us/bkimages.htm
– Background Image Coordinates https://help.tableau.com/current/pro/desktop/en-
us/bkimages_coordinates.htm
• CBI Studio https://cbistudio.interworks.com
– Learn to use tool https://interworks.com/blog/2022/01/24/introducing-cbi-studio-from-interworks/

Tile Grid Map:
– Hexagons For Tile Grid Maps http://blog.apps.npr.org/2015/05/11/hex-tile-maps.html
– Good Data Visualization Practice: Tile Grid Maps https://forumone.com/ideas/good-data-visualization-
practice-tile-grid-maps-0
• Creating Tile Grid Map:
– Brittany Fong http://bfongdata.blogspot.com/2015/11/periodic-table-map.html or
https://www.tableau.com/blog/how-make-tile-grid-maps-tableau
– Matt Chambers https://www.sirvizalot.com/2015/11/hex-tile-maps-in-tableau.html
– Rody Zakovich http://www.datatableauandme.com/2017/12/polygon-hex-map-in-tableau.html

Joshua Milligan https://vizpainter.com/hex-map-spatial-file/ and a video by Anthony Smoak
https://anthonysmoak.com/2018/03/11/create-a-hex-map-in-tableau-the-easy-way/
– Without data blending: https://www.phdata.io/blog/create-a-hex-map-in-tableau-without-data-blending/