Maps Video Lecture Transcript This transcript was automatically generated by Zoom, so there may be discrepancies between the video and the text. 12:22:22 Hi! Everybody! Welcome back in this video, we're gonna start to learn about how to make map based plots and tableau. 12:22:30 So a map based visualization. Our geographic visualizations that use maps as graphic elements as an example. 12:22:36 Here is the New York Times, Kovat vaccination coverage map. 12:22:41 , so here the map is used to provide context for the visualization where each county of the United States is colorored in according to its vaccination coverage covid-nineteen vaccination coverage, and you could huver over an individual counties so for instance, here's franklin county 12:22:58 highlighted, giving the percent of fully vaccinated where they define fully vaccinated at the website so we're gonna learn about how to make mat based visualizations in tableau. 12:23:10 The first thing we're gonna do, though, is, instead of looking at it on the Powerpoint, we're going to go ahead and load the data and do it ourselves. 12:23:19 So in this, video and lecture, we're going to use the sample superstore data which is an Excel spreadsheet provided by tableau that I've put into. 12:23:29 There repository, the data folder of the repository. 12:23:32 So go ahead and open that. 12:23:34 And so this is a data center that has multiple tables in it in order of people or returns. 12:23:41 And so what we're gonna be using is the orders data. 12:23:44 So we're gonna move that orders tab over here, and you can see that the orders table has a number of columns that has an order. 12:23:52 Id the date. The order was placed. A shipping dates, a shipping mode. 12:23:59 Let me see if I can. 12:24:02 There we go, customer id customer, name so forth, so the regions that we're gonna use are the geographic data we're gonna use are the country slas region, the city, the state slash Province, and possibly the postal code. 12:24:18 So let's go ahead and go to our worksheet. 12:24:20 So the first thing I want to do is create some hierarchies. 12:24:24 So for us, we're gonna create a hierarchy of the country, followed by the State province, followed by the city. 12:24:31 So to do this. Remember all I have to do is take the hierarchy, or take the the measure I want, and drag it over there. 12:24:39 So State Slash Province is going to get dragged into country, slash region. 12:24:45 And then for the last part, I'm gonna take city and drag it here below State Slash Province. 12:24:53 So now I have a hierarchy that goes from country to state, to city, or, you know, depending on where we are. 12:24:58 Region, to province, to city. I also wanna point out another new thing that we haven't talked about before. 12:25:04 You'll notice that there's these little globe icons that so these denote location data. 12:25:10 So if you have some data that you would like to make a map out of, if your data is in the correct format, that tableau can recognize, it will read it in as its location, and you can use it as location data, so what I'm gonna go ahead and do is 12:25:27 I'm gonna click on country slash region, or maybe state slash profince. 12:25:32 And let's go ahead and try. Show me, and you can see here that we have 2 map options. 12:25:39 There's this regular maps, and there's symbol maps, and I'm gonna click on Reg maps. 12:25:44 And you'll see we have all of the regions and States slash provinces that are in our data highlighted here. 12:25:51 Okay, so this is just giving us the same slash Province. 12:25:57 You can hover over each one and see them what we're gonna do now is we're gonna go ahead and provide some data. 12:26:04 So let's say we're interested in the sales of this hypothetical company by the region. 12:26:10 Slash by the State Slash Province. So I'm gonna take my sales and bring it over to color. 12:26:18 And now this is colored by the total sales within each of these read or areas. 12:26:25 So the darker again tableau is making it, so that the darker the larger, the lighter, the smaller. 12:26:30 Okay, so New York, unsurprisingly, New York and California provide us the most total sales, probably because they have the highest volume of customers. 12:26:41 We could change this if we wanted to be maybe average instead. 12:26:44 And so you can see that. Okay, but let's go back just to total. 12:26:51 All right. So this is a map. That is where the regions are just simply colored by whatever you would like. 12:27:00 We can also see a symbol map, and in the symbol map you'll have marks or symbols placed on them. 12:27:08 So here the symbols are placed so that the size is equivalent to the total sum of sales. 12:27:14 We could also do other types of symbols. So you could specify. 12:27:19 You want to be square, you could specify. You want it to be circle, which is what it was, but also, interestingly, you could also do a pie chart. 12:27:28 Now the pie chart seems silly because it's not doing anything just yet, but if we go and put any angle, as the sum of sales, and then we could make our color, for instance, the category of product. 12:27:40 So there's 3 types of categories. Where was the category up here? 12:27:45 So if we make our color the category now we've got a pie chart, and if we increase the size we can see the distribution of the different categories of all the of all the different States and provinces. 12:28:01 Okay. So here you can see 1,098, not $1,981 of sales came from the furniture category, for Ontario, Canada, 2,055 came from the technology category of Ontario Canada and so forth. 12:28:20 Okay, so that's let's go ahead and check back in with our slides to see if there was anything else. 12:28:26 So we learned about the hierarchy we learned about Geo data. 12:28:29 We learned about the 2 types of maps, one in which your areas are colored by something and another in which you're using symbols in locations. 12:28:43 So I think that was everything I wanted to cover one thing I'll point out is motivation for a future lecture. 12:28:51 So let's say, if, instead of total sales, you are just interested in percent of sales so maybe you're interested in what percentage of the sales in Montana, and maybe I'll increase the size to make this a little easier, to see what percentage of the sales in montana come 12:29:06 from Furniture versus awful office supplies versus technology. 12:29:11 So and the earlier video, we saw all we have to do for that is, add a quick, the table calculation. 12:29:19 So let's add a quick table calculation of percent of total and then go over one that should be obvious and North Dakota everything is orange, meaning everything should be office supplies. 12:29:32 So when we hover over this, it should look like a 100%, and you'll notice now, it says, point 1 3%. 12:29:38 So that looks weird, right like, why is this? This is clearly a 100% of North Dakota. 12:29:45 What's going on is currently the sum of sales percentage is being calculated with respect to the entire data set. 12:29:53 So point 1 3% of all sales comes from office supplies in North Dakota. 12:29:59 So one way that we could solve this is to go. This is a little trick you go from table to map. 12:30:06 So instead of making this a map first, let's make it a table. 12:30:10 And what do we want to do? We want to have it exactly like it is. 12:30:16 So let's first remove the quick table calculations. 12:30:21 Okay. And then we can go here, and then we can go ahead and do. 12:30:27 Percent of total. And now you'll see that the percentages are with respect to the rows instead of the entirety of the data set. 12:30:36 So now, if I go back to the meant. 12:30:41 The percentages are correct. So this is a nice little trick for when you're doing a tableau, visualization, sometimes it helps to start as a table first and then use the show me to transition into the visualization you like so for some odd reason, when we were making the percentage of you know, of the 12:31:02 whole from the map, and then clicking the quick table. 12:31:08 Calculation. It didn't work. It was giving us the percentage of the entirety as a fraction of the entirety. 12:31:15 But when we went from the table onwards it did work. 12:31:19 It allowed us to get the percentage with respect to the state or province that we are in now, some of you might be saying, Well, that's because you also have to include the sum of sales as a thing that I've tried that before. 12:31:30 It doesn't. It didn't work for me. What I found works is sometimes it's just helpful to start from a table and then work your way to whatever visualization you like. 12:31:37 So that's gonna do it for our maps Lecture. 12:31:41 Just the big notes from this are you need to have data? 12:31:44 That's already formatted to be for geolocation data. 12:31:49 And you need to. And you can make maps in which regions are colored according to a certain variable, or you have symbol maps where you can have a symbol that represent some measure that you're trying to visualize within that location. 12:32:05 Okay. So now you know how to make maps. 12:32:07 Very basic maps, and I'll leave it to you to explore more and find out more on your own about math based visualizations and tableau. 12:32:15 I hope you enjoyed this video, and I hope to see you next time.