MakePoint and MakeLine

Tableau 2019.2 Mapping Feature Preview

With Tableau 2019.2 you can take flat files with latitude and longitude (x and y) coordinates and transform those into beautiful maps. But wait, there’s more! You can also create lines between those points! While the features are currently in Beta, I couldn’t help but download it to start playing around.

The New York City taxi trip data is a great dataset to test out these new features. You can download the data from the Taxi and Limousine Commission’s website. For our example, I created a viz that shows taxi trips on New Year’s Day 2018, starting just after the ball dropped in Times Square. The .csv dataset has records for each trip with coordinates of the middle of each zone where a trip started and ended.

Using a calculated field, you can create points from any numeric field that exists in the data. Creating the origin and destination zones for each trip was as simple as this: MAKEPOINT([Origin Centroid Y],[Origin Centroid X]) for the starting point and MAKEPOINT([Dest Centroid Y],[Dest Centroid X]) for the ending point. The last step is to create the lines with the MakeLine function: MAKELINE([Orig Point],[Dest Point]). This could all be rolled into a single calculated field! Once the calculated fields are created, you can simply double click on the geometry fields and Tableau will handle the rest.

This viz combines these new features with set actions to dynamically reveal the destinations from a pickup zone. It’s interesting to see how far and how long (on average) it takes someone to get to Long Island, the airport and other locations around the city.

There are more new mapping features in 2019.2 including new basemaps, including satellite imagery. The new base maps come with a simplified set of layers that work together nicely through vector mapping.

Check out all the new features over at Tableau’s Coming Soon page.

Leave a Reply

You must be logged in to post a comment.