0:00One of the new features in Tableau 29.2 is
0:05the ability to do make point spatial
0:08calculations.
0:10I'm going to go to my trusted pirate map.
0:14Yes, I actually use the pirate map as an
0:16example of explaining mapping to new users
0:18because
0:19it's actually a really good way to
0:20understand the concept.
0:22So when we're visualizing information, when
0:25we plot locations on a map, we typically
0:28use
0:29two values, a latitude and a longitude.
0:31Depending on the coordinate system your
0:33country uses, you might use slightly
0:35different numbers
0:36like Eastings and Northings are typically
0:38used here in the UK by government
0:40authorities.
0:41In other countries, they might use slightly
0:43different coordinate systems.
0:45But regardless, the principle is the same.
0:47You have some sort of coordinate with a
0:49location.
0:49So if I kind of bring these into point, if
0:52you look at this pirate map, this X is
0:55marked
0:55by these coordinates, six to 6.3.
0:58It's actually got this going backwards if
1:01you look at this very closely, and then 21.
1:033.
1:03So if you go down 21.3, that gives you the
1:07location of the map.
1:08And so this is really, really important
1:10because we often take that for granted in
1:12order to
1:12actually plot this onto the visualization,
1:16Tableau automatically takes the latitude
1:19and
1:19the longitude and creates a point for us.
1:22However, if you don't have a geographical
1:25sort of value, you need to be able to make
1:29a point using a pair of values.
1:31And so that's what make point allows you to
1:34do.
1:34Let's hop back into Tableau and see how
1:36that's done.
1:37Okay, so we're back in Tableau.
1:39And the data I'm going to use for this is
1:41actually one that was released to the
1:43community
1:43by Exosol.
1:44It was a really, really large data set.
1:46It's actually a huge extract.
1:49And it's essentially Chicago taxi data.
1:51So it's an incredibly large data.
1:53What I'm going to do is I'm just basically
1:56very, very quickly understand how big this
1:58data set is.
1:59If I just drag number of records onto text,
2:01you can see that I'm working with 13
2:03million
2:04rows.
2:05To make this slightly easier and quicker to
2:07work with, I'm just going to drag company
2:09onto rows and try and understand which
2:12company has a sort of a reasonable size.
2:14So let's just go with data from the Donald
2:18Barnes company.
2:19Let's just keep that.
2:20Okay, so we have 92 rows.
2:21Now this is going to work a little bit
2:24faster for us.
2:25I'm going to remove that and the number of
2:27records and we're back to square one.
2:29Now, if you recall, if I double click
2:32latitude and longitude, I automatically get
2:35a single
2:36point.
2:37Now in this particular case, it's actually
2:39given me the average of all of those sort
2:41of taxi rides.
2:43But if I was to remove that, and then we
2:47create a calculation.
2:48In this particular case, I'm just going to
2:50open a calculated field by right clicking
2:52on the left hand side and creating this
2:55interface.
2:56And because it's a new function that's
2:58being used here, you can actually use Table
3:01au's
3:01assistance menu here on the right hand side
3:04to show you how to do that.
3:05If you can't see that, if your calculation
3:07window looks like this, you just need to
3:09click
3:09this small arrow to reveal it.
3:12And if I type in make point, you can see
3:16that it's right there.
3:18And actually, if I double click that it
3:21automatically completes the calculation for
3:23us by creating
3:24that and then it also gives you a hint as
3:26to how it should be typed.
3:28It also gives you a hint here on the left
3:29hand side.
3:30So you have latitude and longitude.
3:32And that's basically what it needs.
3:34So what I typically do is I leave this
3:35calculation window open, you can move it
3:38around your screen,
3:39and then just bring in in the order that it
3:43's asked for latitude and then a comma and
3:46then
3:47longitude just put that after that.
3:49Okay.
3:50And if I just increase the space here, you
3:53can see that that now looks correct.
3:56So make point, drop off latitude, drop off
3:59longitude, click okay.
4:01And now we have a new spatial object.
4:04And this time it's just a point.
4:05So if I just call this drop off point, okay
4:13.
4:13And if I double click that, then you
4:15actually get the different drop off points
4:18for that
4:18taxi.
4:19Now this is really, really handy because
4:21what it's doing is it's doing this at a
4:23data level.
4:24So I'm not having to add anything else onto
4:26the level of detail to actually highlight
4:28the different trips.
4:29I've just simply used the make point
4:31function to go and get the points for each
4:33trip.
4:34And when I visualize that, Tableau
4:35correctly assumes that I'd like to see all
4:37the different
4:38drop off points.
4:39So it gives me that detail in the view.
4:41Now I'm extremely lazy.
4:43So what I normally do is actually duplicate
4:46the field I just created, then I edit it.
4:48So that means I get everything absolutely
4:50right.
4:50So let's just call this pickup point.
4:54And then I just need to replace these two
4:55filters.
4:56So I can do that by simply dragging the new
4:58ones on top.
4:58So let's just do this.
5:01And let's just do that.
5:02Perfect.
5:03Click apply.
5:04And there we have it.
5:05Now if I was to double click pickup points,
5:08it's actually slightly different, right?
5:12Because I don't see anything happening.
5:14If I drag off the drop off points, then it
5:16will actually render the pickup points.
5:19You've got to be careful because it's using
5:21the mapping type.
5:22So if I just go back a step, you would
5:24expect to see sort of both on each other.
5:27But actually, that's something you need
5:28another feature for because what you'd want
5:30to do
5:31is draw a line between the two.
5:33So tune into that video and I'll show you
5:35how to do that.
5:36But that's it.
5:37That's the make point feature that allows
5:39you to create data points from coordinates.
5:42And you can visualize them straight away in
5:45Tableau.
5:46If you found that video useful, hit
5:47subscribe.
5:48If not, drop a comment in the comment
5:50section below and let us know what kind of
5:52content