Locked lesson.
About this lesson
In this lesson, we'll learn all about using Zipcodes with your Visualizations.
Exercise files
Download this lesson’s related exercise files.
24 - Using Zipcodes With Maps.docx60.4 KB 24 - Using Zipcodes With Maps SOLUTION.docx
55.9 KB
Quick reference
Using Zipcodes With Maps
In this lesson, we'll learn all about using Zipcodes with your Visualizations.
When to use
Use this whenever you have zipcode data and want to visualize it with a map.
Instructions
You may have to convert your zipcode measure into a dimension. Click the caret on the measure pill and select "Geographical Role" and then choose "ZIP Code/Postcode"
Hints & tips
- Convert your zipcode measure into a dimension.
- Click the Measure Caret of your zipcode, then select "Geographical Role", then select "ZIP Code/Postcode"
- 00:04 In this video I want to look at zip codes.
- 00:06 And if we look at our show me thing, we can see if we hover over these two things
- 00:11 right here we have symbol maps and maps.
- 00:13 And one of the nice things about Tableau is you can use maps based on
- 00:17 geolocation data, latitude, longitude, zip codes, things like that.
- 00:22 But this is all grayed out, and you'll notice that owner zip,
- 00:26 zip codes, is listed as a measure.
- 00:28 This is kind of weird, right, because a zip code is not a numerical value,
- 00:33 right, we're not counting zip codes.
- 00:36 A zip code is descriptive, I live in Las Vegas the zip code is 89129,
- 00:41 that's not a numerical value that means something, I can't add one zip code
- 00:46 to another zip code and get a summed total, right, that's not what this is.
- 00:51 It's not really a numerical type of thing, this is really a descriptive thing,
- 00:55 this should really be a dimension, it should be up here.
- 00:57 So we're going to just come over here, and there's a couple of different ways we
- 01:02 can do this, we could set the geographical role.
- 01:07 And you can see it has a bunch of different options, well, latitude,
- 01:12 longitude, airport codes, a zip code and post code, so
- 01:16 that's what this is supposed to be so I'm just going to go ahead and click that.
- 01:21 And you can see, boom, it's no longer listed in here, the owner zip is now up in
- 01:26 dimensions, it's all blued out, and what we do have is a latitude and a longitude
- 01:30 that have been generated for us by Tableau based on that zip code information.
- 01:35 So that's really cool, we can now use this stuff
- 01:38 as a map type thing to show representations in our visualization.
- 01:43 So let's bring in our count, and let's bring in our owner zip, and
- 01:47 maybe we want to turn these around, it really doesn't matter.
- 01:52 And we can see a list of all the dogs that are registered in each zip code,
- 01:55 it doesn't mean a whole lot to us, but now we can use these maps.
- 01:58 So if we click on this we can see, boom, here's a map of the US,
- 02:02 we've got a little legend here on the side.
- 02:05 And I'm just going to sort of hover over here and with my mouse sort of scroll in,
- 02:10 and we can sort of break this down.
- 02:12 Now we knew these are from Pennsylvania, we can see there's Pennsylvania, and
- 02:16 very cool.
- 02:18 Now we can click over here, we could change it to this other map, and this sort
- 02:23 of breaks it down geospatially a little bit differently, but very, very cool.
- 02:33 We can add the breed as colors and really get crazy.
- 02:38 So very, very interesting.
- 02:40 And you can see, it's not just Pennsylvania it looks like, interesting.
- 02:45 So that's zip code,
- 02:46 just be aware that you're really probably going to have to convert zip code.
- 02:52 Because Tableau makes a good best guess whenever you import data, and
- 02:55 I tend to notice that it kind of gets a little confused from time to time with zip
- 02:59 codes, it tries to make it into a measure when it's really not.
- 03:02 This latitude and longitude is a measure,
- 03:04 those are numerical values that mean something numerically.
- 03:08 A zip code doesn't mean anything numerically,
- 03:10 it really should be a dimension, it's more of a descriptive thing than anything.
- 03:14 And that's how we do that, so that's all for this video.
- 03:16 In the next video, we'll look at adding dates and drilling down by date.
Lesson notes are only available for subscribers.