Tableau Geographic Data and Mapping Questions and Answers 1 — Questions and Answers
Question 1: A data analyst has a field named `[State/Province]` in their dataset containing full state names. To use this field to create a map visualization in Tableau, what is the most direct and fundamental step the analyst must take?
- Create a calculated field to convert the state names to two-letter abbreviations.
- Assign the 'State/Province' geographic role to the field. (Correct answer)
- Change the field's data type from 'String' to 'Number (whole)'.
- Drag the field onto the 'Size' mark on the Marks card.
Correct answer: Assign the 'State/Province' geographic role to the field.
Tableau automatically generates latitude and longitude coordinates for fields that have a recognized geographic role. Assigning the 'State/Province' role tells Tableau to treat the text values in that field as geographic locations, enabling map creation without needing manual coordinate data.
Question 2: You are creating a map in Tableau to analyze store performance. The primary data source contains store locations with sales data. You want to overlay customer locations from a separate, secondary data source on the same map to visualize the proximity of customers to stores. What is the most effective method to achieve this in a single map view?
- Use a dual-axis map by placing two sets of generated Latitude fields on the Rows shelf.
- Create two separate map worksheets and combine them on a dashboard using a transparent background.
- Add a new marks layer to the map for the secondary data source. (Correct answer)
- Blend the two data sources on location fields and use a single set of marks.
Correct answer: Add a new marks layer to the map for the secondary data source.
Tableau's map layers feature (introduced in version 2020.4) allows you to add multiple layers of geographic data from different data sources to a single map. By dragging a geographic field from the second data source onto the view and choosing 'Add a Marks Layer', you can display both store and customer locations independently on the same map background.
Question 3: When creating a map of US cities, an indicator appears in the lower-right corner of the map view stating '12 unknown'. When you click on the indicator, the 'Edit Locations' dialog shows several cities are 'Ambiguous'. What does this status indicate?
- The city names exist in more than one state or country in Tableau's geographic database. (Correct answer)
- The data source does not contain the required latitude and longitude fields.
- The city names contain spelling errors that Tableau cannot recognize.
- The geographic role for the city field has not been correctly assigned.
Correct answer: The city names exist in more than one state or country in Tableau's geographic database.
An 'Ambiguous' location status means Tableau found multiple possible locations for a given name. For example, the city 'Springfield' exists in many US states. The 'Edit Locations' dialog allows the user to resolve this ambiguity by specifying the correct state or country for each ambiguous city name, often by using information from another field in the data.
Question 4: An analyst wants to create a scatter plot of customer locations and then, for each customer, calculate the distance to a specific distribution center located at 40.7128° N, -74.0060° W. Which combination of Tableau spatial functions is best suited for this calculation?
- AREA() to define the distribution center and BUFFER() to find customers.
- MAKELINE() to connect customers to the distribution center and INTERSECTS() to find the distance.
- SHAPETYPE() to identify the center and LENGTH() to calculate the distance.
- MAKEPOINT() to create a geographic point for the distribution center and DISTANCE() to calculate the distance to customers. (Correct answer)
Correct answer: MAKEPOINT() to create a geographic point for the distribution center and DISTANCE() to calculate the distance to customers.
The `MAKEPOINT(latitude, longitude)` function is used to create a spatial point from coordinate values. The `DISTANCE(point1, point2, units)` function then calculates the straight-line distance between two spatial points. This combination is ideal for creating a spatial point for the distribution center and then calculating the distance from each customer (point1) to that fixed point (point2).
Question 5: A company has a dataset of its proprietary sales territories, which are not standard geographic boundaries like zip codes or counties. To map data by these custom territories, the analyst needs to import them into Tableau. Which of the following describes a valid method for achieving this?
- Create a `.tms` (Tableau Map Source) file and connect to it as a background map.
- Prepare a CSV file with columns for territory names and standard geographic roles (e.g., Country, State, Lat/Long), then import it via the Map menu. (Correct answer)
- Merge the territory data directly into Tableau's default map server database.
- Use a 'Group' function on the State field to create the custom territories.
Correct answer: Prepare a CSV file with columns for territory names and standard geographic roles (e.g., Country, State, Lat/Long), then import it via the Map menu.
Tableau allows users to extend its built-in geocoding by importing custom geographic locations. The standard process involves creating a CSV file that includes the custom geography names along with columns for standard roles. This file is then imported using the `Map > Geocoding > Import Custom Geocoding` option, allowing Tableau to recognize and plot the new territories.
Question 6: A dashboard designer has created a map visualization for end-users. They want to prevent users from zooming or panning away from the primary region of interest, effectively locking the map's viewport. Which of the following actions would allow the designer to restrict these specific map navigation capabilities?
- Unchecking 'Allow Pan and Zoom' in the Map Options dialog box. (Correct answer)
- Disabling the 'Show View Toolbar' option for the worksheet on the dashboard.
- Removing the generated Latitude and Longitude fields from the Rows and Columns shelves.
- Hiding the map's color legend and any related filters.
Correct answer: Unchecking 'Allow Pan and Zoom' in the Map Options dialog box.
The Map Options menu (`Map > Map Options...`) provides granular control over the end-user's interaction with a map. By unchecking the 'Allow Pan and Zoom' option, the author can lock the map's viewport, preventing users from navigating away from the intended view. The other options remove UI elements but do not disable the underlying scroll-to-zoom or click-and-drag-to-pan functionality.
A data analyst has a field named `[State/Province]` in their dataset containing full state names.
To use this field to create a map visualization in Tableau, what is the most direct and fundamental step the analyst must take?