2019: Week 4 Solution
Welcome back for the solution of week 4’s challenge! I wouldn’t put money on this being the last basketball themed challenge so don’t fret if you’re worried that this’ll be a one-time topic.
Whilst this week did require some data preparation, the challenge had the unusual goal of using the Profile Pane to recover answers instead of generating a whole workflow to get there. The aim of this was to demonstrate how versatile the Profile Pane can be for quickly generating answers to questions that could otherwise require multiple cleans, pivots, aggregations, etc. To this end, we’ll highlight a few of the cool functionalities of the data pane that could have come in handy for you for our challenge!
However, firstly for the impatient among you just looking to check your answers, here they are, but I’d recommend continuing reading to learn more about the functionality used:
Q1. In games won by the Spurs, which player most often scores the most points?
Ans: Aldridge
Q2. In games lost by the Spurs, which player most often scores the most points?
Ans: DeRozan
Q3. What combination of players scores the most points, rebounds and assists the most frequently?
Ans: DeRozan (Ass) – Aldridge (Reb) – DeRozan (Pts)
Q4. Which player is the second most frequent at gaining the most assists in a game?
Ans: White
Q5. With the answer to Q4, where do all these games happen: Home or Away?
Ans: Home
Q6. Which player scored the most points in games in October 2018 the most frequently?
Ans: DeRozan
Certainly looks like one player in particular is carrying the Spurs but maybe I'm just looking through DeRozan tinted glasses.
You may have noticed that for string fields, each individual value is displayed. However, date and numerical fields are automatically grouped and put in bins. You can manually change this for each field so that each value is displayed on its own line. This can be incredibly handy for numeral fields that possess a deeper meaning than simply their value, such as a jersey number for a basketball player or the number of a game within a series of games. It also comes in handy for getting a glimpse at the underlying distribution of data as sometimes the bin groups can be quite large, such as when date fields get binned.
You can do this by hovering over the field in the data pane to display the three “More Options” dots, clicking them, and changing the View State from Summary to Detail.
NOTE: Before I move on, there's an important word of warning for the below tips. If you have a large set of data then Tableau Prep automatically takes a sample of the data rather than all the data. This means that the below tips may not be representative of the true distribution of the data. You can identify whether your data has been sampled at any step by looking out for the red [Sampled] warning in the top left of the profile pane.
Whilst this functionality isn’t exactly hidden, it’s definitely worth highlighting in case you’ve missed it. In the Profile Pane, each value (or group of values if set to Summary view) has a bar behind it which shows the “number of records” for the value. This allows you to get a super quick overview of how the data is distributed. You can even sort these bars by count or A-Z (both ascending & descending). This sort option comes in handy for challenge 4 when you need to find the 2nd most common top scorer (as seen above in the challenge 4 GIF).
Yes, simply clicking a value in one field will perform a highlight action on the bars in other fields in the profile pane. This allows you to get a super quick look at connections between values and begin spotting relationships. You can see this demonstrated in the GIF for challenges 1 & two as I click between Win and Loss values to find their solutions. After clicking on a value and highlighting related rows in other fields, you can then also hover over the highlighted bars and it will add to the tooltip just how many rows were highlighted and the % of rows that were highlighted for that value.
In order to drill further into how the data links together you can start clicking multiple related values across fields by holding down CTRL to select specific values across fields or SHIFT if you want to quickly select a bunch of values in a single field (for example if you wanted to highlight a range of dates). This is demonstrated in the GIF for challenge 3, where I first select the most common player for Assists, and then begin exploring the related values in Rebounds and Points to find the most common combination of players.
Whilst this week did require some data preparation, the challenge had the unusual goal of using the Profile Pane to recover answers instead of generating a whole workflow to get there. The aim of this was to demonstrate how versatile the Profile Pane can be for quickly generating answers to questions that could otherwise require multiple cleans, pivots, aggregations, etc. To this end, we’ll highlight a few of the cool functionalities of the data pane that could have come in handy for you for our challenge!
However, firstly for the impatient among you just looking to check your answers, here they are, but I’d recommend continuing reading to learn more about the functionality used:
Our workflow demonstrating a possible solution. |
Q1. In games won by the Spurs, which player most often scores the most points?
Ans: Aldridge
Q2. In games lost by the Spurs, which player most often scores the most points?
Ans: DeRozan
GIF demonstrating finding the solutions to Q1 & Q2. |
Q3. What combination of players scores the most points, rebounds and assists the most frequently?
Ans: DeRozan (Ass) – Aldridge (Reb) – DeRozan (Pts)
GIF demonstrating finding the solution to Q3. |
Q4. Which player is the second most frequent at gaining the most assists in a game?
Ans: White
Q5. With the answer to Q4, where do all these games happen: Home or Away?
Ans: Home
GIF demonstrating finding the solution to Q4 & Q5. |
Q6. Which player scored the most points in games in October 2018 the most frequently?
Ans: DeRozan
GIF demonstrating finding the solution to Q6. |
Certainly looks like one player in particular is carrying the Spurs but maybe I'm just looking through DeRozan tinted glasses.
For numerical and date fields, you can switch between Detail and Summary views.
You may have noticed that for string fields, each individual value is displayed. However, date and numerical fields are automatically grouped and put in bins. You can manually change this for each field so that each value is displayed on its own line. This can be incredibly handy for numeral fields that possess a deeper meaning than simply their value, such as a jersey number for a basketball player or the number of a game within a series of games. It also comes in handy for getting a glimpse at the underlying distribution of data as sometimes the bin groups can be quite large, such as when date fields get binned.
You can do this by hovering over the field in the data pane to display the three “More Options” dots, clicking them, and changing the View State from Summary to Detail.
Swapping from Summary view to Detail view. |
NOTE: Before I move on, there's an important word of warning for the below tips. If you have a large set of data then Tableau Prep automatically takes a sample of the data rather than all the data. This means that the below tips may not be representative of the true distribution of the data. You can identify whether your data has been sampled at any step by looking out for the red [Sampled] warning in the top left of the profile pane.
The Profile Pane displays “number of records” bar charts for each field
Whilst this functionality isn’t exactly hidden, it’s definitely worth highlighting in case you’ve missed it. In the Profile Pane, each value (or group of values if set to Summary view) has a bar behind it which shows the “number of records” for the value. This allows you to get a super quick overview of how the data is distributed. You can even sort these bars by count or A-Z (both ascending & descending). This sort option comes in handy for challenge 4 when you need to find the 2nd most common top scorer (as seen above in the challenge 4 GIF).
Clicking a value in one field will highlight all related rows in other fields
Yes, simply clicking a value in one field will perform a highlight action on the bars in other fields in the profile pane. This allows you to get a super quick look at connections between values and begin spotting relationships. You can see this demonstrated in the GIF for challenges 1 & two as I click between Win and Loss values to find their solutions. After clicking on a value and highlighting related rows in other fields, you can then also hover over the highlighted bars and it will add to the tooltip just how many rows were highlighted and the % of rows that were highlighted for that value.
You can SHIFT-click and CTRL-click multiple values across fields to narrow down the related highlighted rows
In order to drill further into how the data links together you can start clicking multiple related values across fields by holding down CTRL to select specific values across fields or SHIFT if you want to quickly select a bunch of values in a single field (for example if you wanted to highlight a range of dates). This is demonstrated in the GIF for challenge 3, where I first select the most common player for Assists, and then begin exploring the related values in Rebounds and Points to find the most common combination of players.