From the course: Complete Guide to Tableau for Data Scientists

Understand the difference between green and blue fields - Tableau Tutorial

From the course: Complete Guide to Tableau for Data Scientists

Understand the difference between green and blue fields

- [Instructor] To really understand what Tableau's doing, it's essential to understand the difference between blue and green. Now, what do we mean by blue and green? Well, let's look at a typical user interface. We can see we have some green fields, we have some blue fields. If we look at our rows and column shelves at the top, we have the sum of sales in green and the subcategory in blue. On the Marks card, again, we've got a category in blue, some of sales in green. And when we look at our data pane on the left hand side, we can see all the icons for our measures and dimensions are colored green and blue. Now, that's not just to look pretty. Those differences are really, really important. And what do they represent? Now, for a lot of people, they make the assumption that it's to do with whether it's dimensions or measures. And if you look at the interface, you can see how Tableau groups, all the dimensions in blue, all the measures in green, but actually that's not what the color coding means. The color coding is actually to do with whether it's discrete or continuous. So what is discrete and continuous data and what does that mean for us? Well, first we need to define what discrete data is and what continuous data is. So discrete data can only have certain values. There's only a finite set of those values that the discrete data can have, and typically you can count those values. So it's kind of data that you can count up. Now in some cases, but not all, discrete data will have a logical sequence. So for example, if you were talking about temperature, you might have cold, mild, warm, hot. There's a certain logical sequence to it that we assign. On the other hand, continuous data has a whole range of values, and in actual fact, there's an infinite set of values within a range. You can get smaller and smaller definitions of a continuous range by more high precision. Continuous values can't be counted, but they can be aggregated together. Now, that's kind of a broad definition of those two. But to understand it, let's think of a data set that everybody's familiar with. Then there's lots of things we could measure about the human body. And if we took a collection of people, either in the workplace or a school, or just a general population, there's lots of things we could measure about the human body and we get lots and lots of different data. If then we were to go through each of those datas and then categorize 'em as either discrete or continuous, how would that occur? What would happen? So let's start off by looking at the number of limbs. So if we went along and counted how many limbs everybody has. Now there's a finite number of limbs that it's possible to have. So we record how many limbs each of our persons have. And that's a good example of what would be discrete data. There's a finite number and every single person is going to have either this many, this many or this many. What about ages? So again, we could go and ask everybody's age. Now, depending on the degree of accuracy we do with somebody's age, maybe it's how many years or years and months or numbers of days or numbers of hours, there is a range of values that people could have. And it could be a small range or it could be a large range, depending on the population we decided to ask. But the ages would all fit somewhere on a scale between the oldest and the youngest. Or what about heights? Again, you could line everybody up and measure their heights. And again, depending on the precision that we do, everybody's going to be on somewhere of a range between the shortest to the tallest, and everybody else would fit somewhere within there, depending on the precision. Eye color. Now that's an interesting one. If we looked at everybody's eyes and looked at the color of those eyes, what would they be? Well, even though there's a lot of variation, we tend to categorize those as something like blue, green, brown, hazel, gray, gray-blue, and then kind of variations on that. But there's still only a finite number. And when you think about it, there's probably not a huge amount. So typically, we'd think of eye color as being discrete. Hair length, well, much like height, we could go to everybody, can measure how long everybody's hair was. There'd be some people with no hair to some people with long hair, and everybody else's hair length would fit somewhere within that range. But when you think about it, how do you describe your hair? I mean, you don't describe it as, "My hair is 20 centimeters long." You describe it as shoulder length or medium or long or short, or none if you're bald. So actually hair length could be described as being discrete. Well, actually, what about height and age? Those ones could also fit in there as well, because people, if you were to describe somebody, they don't tend to describe themselves in terms of the numbers of centimeters or meters or feet, inches tall they are. They might say they're a short person, they're a tall person. Same with age. It could be young or middle age or elderly. There are certain data types that fit discrete or continuous really neatly. Then there are other ones that kind of straddle the two. And in that case, it depends on the use case in which we're looking at. As we'll see with Tableau, Tableau treats discrete and continuous data very, very differently. If we apply discrete values to color, we get discrete colors. If we put continuous data on, we have a range of colors. Understanding what Tableau does with these data is going to enable us to build exactly the right visualization that we want. So to carry on this, check out some of the other videos where into more detail about how Tableau treats discrete and continuous data with all aspects of the user interface. Remember, some data is very much discrete, some is very much continuous, but there is some data that can switch between the two, and which one you'd use? Well, it depends.

Contents