KNOWLEDGE BASE

Plotting Geographic Data Using Custom Longitude and Latitude Values


Published: 04 Aug 2014
Last Modified Date: 02 Aug 2017

Question

How to create a map using the longitude and latitude fields from a data source instead of using the built-in geocoding data.

Environment

Tableau Desktop

Answer

  1. Download the attached LongitudeLatitudeTestData.xlsx file, which you will find in the upper right-hand corner of this article under "Attachments".
  2. In Tableau Desktop, connect to LongitudeLatitudeTestData.xlsx. For more information, see Connect to Data.
  3. In Measures, right-click Ln, and then select Geographic Role > Longitude.
  4. In Measures, right-click Lt, and select Geographic Role > Latitude.
  5. Drag Ln to the Columns shelf.
  6. Drag Lt to the Rows shelf.
  7. Drag Place to Detail on the Marks card.
To view these steps in action, see the video below: 

Additional Information

  • The longitude and latitude fields in the data source must include at least one decimal place.
  • The longitude and latitude must be separate fields in the data source. For example, see attached spreadsheet.
  • The example data contains the latitude and longitude values for West Virginia, Virginia, and Maryland. The field and state names are altered so that Tableau Desktop will not automatically recognize them as geographic locations.
Did this article resolve the issue?