Knowledge Base

Finding Background Image Coordinates


RELATED ARTICLES

Product(s):  Tableau Desktop
Version(s):  All
Last Modified Date:  09 Dec 2011
In many scenarios, you may want to map your data onto a background image other than Tableau's maps. This article serves as a guide for creating a table in your database that contains coordinates for mapping on a background image.

Create the coordinate table.

Create a table in the database that contains only three columns (it can contain more if you need more columns to identify a unique mark). The first column holds the unique identifier for each mark, and the other two columns are for the X and Y coordinates. You then join this new coordinate table to the original dataset. The join is based on the unique identifier used in both the original table and the coordinate table (the identifier that represents a single mark).

Step 1

Select a scale that is appropriate for your background image. If the image is wider than it is tall, use X: 0-100 and Y: 0-50.

Step 2

For this example, open the Superstore sample from your Tableau repository in Excel and select a new worksheet tab.

Step 3

On the new tab, put a single row in a table that contains one of the unique identifiers and the end points you selected for your two scales.

Step 4

Change the tab name to Coords and save the file.

Connect to the coordinate table.

Step 1

In a new Tableau workbook, select Connect to Data.

Step 2

In the Connect to Data dialog box, select Microsoft Excel and then click Next.

Step 3

In the Excel Workbook Connection dialog box, browse to and select the updated version of the Superstore file.

Step 4

In the Excel Workbook Connection dialog box, under Step 2, select Orders in the table list, and then select Multiple Tables.

BackgroundImage14.png

Step 5

Click Add New Table.

Step 6

In the Add Table dialog box, under Select the table to add, select Coords, and then click the Join tab.

Step 7

On the Join tab, under Table Fields, Product Area is already highlighted in the alphabetical listing. Under Schema Fields, select Product Sub-Category, and then click Add.

Step 8

In the Join Type list, select Left.

Step 9

When finished, click OK in the Add Table dialog box and the Excel Workbook Connection dialog box.

Step 10

In the Data Connection dialog box, select a connection method.

Import the background image

Step 1

Select Data > Background Images.

Step 2

In the Background Images dialog box, click Add Image.

Step 3

In the Add Background Image dialog box, browse to and select the file.

Step 4

Under X Field, select X in the list.

Step 5

In the Right text box, type 100 (100 is the number you used in the coordinate table).

Step 6

Under Y Field, select Y in the list.

Step 7

In the Top text box, type 50 (50 is the number you used in the coordinate table). Be sure to type in the correct text box - the Top text box is in the bottom location under Y Field.

Step 8

Click OK, and then click OK in the Background Images dialog box. (Disregard the Valid setting of No in the Background Images dialog box.)

Find the coordinates.

Step 1

From the Measures pane, drag X to the Columns shelf and Y to the Rows shelf.

Step 2

On the Columns shelf, right-click X and select Dimension.

Step 3

On the Rows shelf, right-click Y and select Dimension.

Step 4

The background image appears in the view.

Step 5

Right-click the X axis and select Edit Axis.

Step 6

In the Edit Axis dialog box, select Fixed, and then in the Start text box, type 0, and in the End text box, type 100.

Step 7

When finished, click OK.

Step 8

Right-click the Y axis and select Edit Axis.

Step 9

In the Edit Axis dialog box, select Fixed, and then in the Start text box, type 0, and in the End text box, type 50.

Step 10

When finished, click OK.

Now the axes start at zero.

Step 11

Right-click anywhere on the image where you want to find the coordinates, and select Annotate > Point.

Step 12

In the Edit Annotation dialog box, click OK.

Step 13

Repeat steps 11 and 12 for each point you want to annotate.

The coordinates appear on the background image as a callout. You can move a callout to a location where it shows up better; just click and drag it. You can also resize the callout by dragging one of the size handles. You can move a coordinate point to a new location by clicking and dragging the arrowhead; the coordinates in the callout change to reflect the new location.

Step 14

Add these coordinates to the Coords worksheet in the Superstore Excel workbook and save the changes.

Step 15

In Tableau, select Data > Refresh.

The refreshed view displays marks at the coordinate locations.

If you don't want to continue to display the callouts, you can select and delete them on the background image.

Other Ideas
Try placing another Measure on the Size shelf and put either a Dimension or Measure on the Color shelf. Add your own custom shapes. Develop powerful and unique analyses by creating Actions between this view and your other analyses.

If you want to hide the X and Y scales, right-click the respective field on Columns or Rows and clear the selection of Show Header.

Alternate Search Terms: How To

Did this article resolve the issue?


ATTACHMENTS





Search Knowledge Base