Advanced Mapping


1. Modifying Locations

>> Edit errors in geocode data

[Problem] Not all the counties are shown in the map

  • Error: [Ambiguous] : same counties in other states have the same names

  • Error: [Unrecognized] : typos (spelling errors)

    image-20210611142730705

[Fix the problems]

  • Fix the ambiguous errors

    • [Map] menu --> [Edit Locations]

    image-20210611133106539 image-20210611133132793


    • Fix the state to Washington

    image-20210611134212289


  • Fix the typos (spelling errors)

    • [Edit Locations] dialog box

      image-20210611135850152


    • click the error and type the correct spelling

    image-20210611134402850



>> Assign locations to data

[Mission] Add the location of each region’s corporate headquarters


[Problem] Values in the field are North, South, East, and West, which Tableau doesn’t have a default location for.


[Fix the problem] – Add specific locations

  • Select the warning box --> Select [Edit Locations]

    image-20210611140725873 image-20210611140820483


  • match the data to specific values (match our regions to specific cities)

    image-20210611140903967 image-20210611141123526


  • Problem fixed

    image-20210611141330274


2. Customizing Geocodes for Addresses

When there are geographic fields that Tableau doesn’t recognize, you can assign your own Custom Geocodes to map your data.


[Mission] Map the various tour sites located around the city


[Problem] Tableau cannot recognize Street Address as geographic data

image-20210611142902652 image-20210611142927831


[Fix the problem] Custom geocode addresses by matching a street address to a specific latitude and longitude coordinate

  • Generate the latitude and longitude coordinate with address using a batch geocoding website

  • Create an excel spreadsheet (named as “Geocoded addresses”) which contains each Tour Site along with its matching latitude and longitude coordinate

    image-20210611145803655
  • Add the data source “Geocoded addresses”

  • [First] Start with the “Geocoded addresses” data source:

    • [Rows] : Latitude

      [Columns] : Longitude

    • [Label] : [Tour Site]

    image-20210611150700556
  • [Second] Switch to the original data source:

    • blend two data sources with the common field [Tour Site]

      image-20210611151314021
    • [Size] : [Number of Records]

    image-20210611151444104
  • Add streets and highways into the map

    • [Map] menu --> [Map layers]

      image-20210611152346166

    • check the [Streets and Highways]

      image-20210611152429750



3. Using a Background Image

We can use an background image and X/Y coordinates to show locations on a map


[Mission] Create an interactive map that shows the location of meeting rooms and their seating capacity in a company’s building

  • Add a background image of an office layout, and
  • Then plot the meeting room data on top of it

[Data]

  • Room information and X / Y coordinates for each room
  • Contains no X / Y coordinate values (NULL) for the room Woodland
image-20210611154316516

[Process]

  • Add [X] to [Columns]

    Add [Y] to [Rows]

    remove axis


  • Add the background image

    • [Map] menu --> [Background images] --> Data source name

      image-20210611155035997
    • Add Image

      - X Field: Left – 0, Right – 627 (pixels value)

      - Y Field: Right – 0, Left – 673 (pixels value)

      image-20210611155349612 image-20210611155531723


  • Drag [Room Name] to [Detail]

    Drag [Room Capacity] to [Size]

    Set [Tooltip]

    image-20210611155930497
  • Deal with the NULL data

    • Right-click anywhere on the view --> [Annotate] --> [Point]

      image-20210611160129997 image-20210611160210010

    • Drag the annotation to the location of Room Woodland

      image-20210611160451072
    • Update the room information file with Room Woodland’s X / Y coordinates

    • Refresh the data source connection in Tableau by pressing F5

      image-20210611160920327
    • Delete the annotation (coordinate tool) by selecting it and pressing the Delete key on the keyboard