Worksheet enhancement
Mapping is the star of the newest Tableau version. We'll cover the new MakePoint
and MakeLine
functions, as well as the new vector map. These two new features will allow you to enjoy building maps even more than before.
MakePoint and MakeLine (2019.2)
Since Tableau 10.2, you have been able to connect to a spatial file to create maps using the Geometry field (a Point, a Line, or a Polygon). Each new release brought new capabilities, such as using a spatial field directly from a database or the recent spatial join: Intersect. Tableau Desktop 2019.2 brings two new functionalities: MakePoint and MakeLine.
MakePoint and MakeLine are two new functions. MakePoint converts Latitude and Longitude into a spatial point. MakeLine takes two Points and creates a spatial Line. This allows you to create a path between two places on Earth by taking into account the curvature of the earth and joining spatial and nonspatial files with Latitude and Longitude.
Let's visualize the top 100 busiest air routes.
Note
Download the Flights.xlsx
Excel file from the Chapter 1: Catching up with Tableau 2019 section of my website, https://tableau2019.ladataviz.com or browse to https://ladataviz.com/wp-content/uploads/2019/05/Flights.xlsx.
This file contains one hundred lines and provides information on the departure and arrival to airports, as well as the number of passengers.
Let's start:
- Open Tableau Desktop and select Microsoft Excel.
- Connect to the
Flights.xlsx
file you've just downloaded. - On Sheet1, create a new calculated field. Name it
Departure Point
and write the following formula:MAKEPOINT([Departure Latitude],[Departure Longitude])
. - Create a second calculated field for the arrivals. Name it
Arrival Point
and write the following formula:MAKEPOINT([Arrival Latitude],[Arrival Longitude])
. - You have created two calculated fields that contain spatial points that are mapping the departure and arrival airports. You can test your fields by simply double-clicking on them.
- Create a final calculated field for the routes. Name it
Air Routes
and write the following formula:MAKELINE([Departure Point],[Arrival Point])
. - On a blank Worksheet, double-click on Air Routes; this will automatically generate all the paths on a map.
- To finalize the visualization, add the Route Dimension in Detail to separate each path, and add the Passengers Measure in Size and Color to visually spot the busiest routes. The following screenshot shows the final results:
If, like me, you aren't new to Tableau, you will be impressed by how fast and easy it is to achieve this now. That's what we love about each new Tableau release: it always makes our analysis faster and easier to do.
As I said, mapping is the star, so let's continue with this new mapping style.
Vector Map (2019.2)
Are you ready for a smoother, faster, and more powerful than ever mapping experience? Yes, you are! Using maps in Tableau Desktop 2019.2 never felt better. Using the MapBox technology, Tableau maps now use vectors for an incredibly smooth zoom in and out.
Go ahead – open your favorite visualization that includes a map and try it yourself!
But that's not all! Let's open the Maps Layers pane using the Map top menu. Three new styles have been added. You can now visualize your data using the Streets, Outdoors, or Satellite styles. I can now show you where I grew up; good luck finding it:
Oh! And is if this wasn't enough, there are also new data layers that you can add: Terrain, Routes, Water Labels, Cities, Point of Interest, Neighborhoods, Building Footprints, and so on. Each style has newer and richer layers. Mapping has never been so good.
Other improvements
The following is a list of other small visualization improvements:
- Sort Controls: On the Worksheet top menu, you'll find a new option, Show Sort Controls, which allows you to choose whether users can change the sort order. (2019.2)
- Nested sort: You can now use the nested sort feature on multiple dimensions (2019.1)
- Tooltip reference line: On the reference line configuration window, you can now modify and even totally remove the tooltip (2019.2)
Now, we'll look at the new features available for Dashboards.