Posts in Workout Wednesday

Week 49: Where Do Sub-Categories Succeed?

Last week I had the honor of attending Tapestry Conference in Miami.  While I was there Jon Schwabish gave a quick 6 minute talk that connected every chart to every other chart.  This along with some of Elijah Meek’s keynote mentioning that data viz is getting more custom and funky got me curious about some neglected chart types.  Combine this with a recent interest in how clustering works in Tableau and you’ve arrived at the genesis for this week’s challenge.  Your goal is to create a Parallel Coordinates chart (click the link if you’re not sure what it is).

This chart is perfect for multivariate analysis and seeing relationships among more than 2 measures (in this case 3).  It can also be useful for finding commonalities among things.  Traditionally I think most people may shy away from implementing this in Tableau because quite often different measures have different scales, so as part of the challenge, you’ll have to figure out how to overcome that obstacle to present a parallel coordinate chart with 3 measures of different magnitudes.

Also to help reinforce some recent challenges using table calculations – you are not allowed to use LODs and must only use table calculations and regular calcs.

Click to view on Tableau Public

Requirements

  • Dashboard size: 1200 x 850; you choose # of sheets
  • Create a parallel coordinate chart that shows Sales, Profit Ratio, and # Customers (CountD Customer Name) per sub-category
  • Do not use LODs, use table calculations (and normal calculated fields)
  • Each sub-category should be positioned based on its value, but all measures should be on one sheet
  • Ensure there is a dark gray vertical line for each measure
  • Label the top and bottom of each vertical line with the measure name and respective minimum or maximum
  • Color the lines based on which measure the sub-categories have the highest value in
  • Colors are based off of the Viridis color palette, which I encourage you to paste into your .TPS file
  • Create a color legend that has a hover action based on the newly defined colors (high sales, high profit ratio, high customers)
  • Match formatting & tooltips

Dataset

This week uses the superstore dataset for Tableau 2018.3.  You can get it here at data.world

Attribute

When you publish your solution on Tableau Public make sure to take the time and include a link to the original inspiration.

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday2018 and tag @AnnUJackson@LukeStanke@lorna_eden@curtisharris_@RodyZakovich, and @VizWizBI!

Track your progress

Also, don’t forget to track your progress using this Workout Wednesday form.

Week 48: Profitability Bridge

This week we’re building a chart I was asked to create at work. A stakeholder drew this exact chart type and said, “make the chart look exactly like this!” At first glance I wasn’t sure I would be able to do it. After a little playing around I was able to re-create it!

Challenge

Click to view on Tableau Public

Requirements

  • Dashboard size is 500px wide by 800px tall.
  • Create a waterfall chart showing the top 5 sub-categories by sales. Include an other category for all other categories.
  • Show a bar on the far-left of the waterfall that shows all sub-categories. Label it all.
  • Add dashed lines that “connect” each bar.
  • Add a dashed line that connects the All bar with the Other bar.
  • Make sure each line looks as a single continuous dashed line. Watch your padding and axis label width!
  • Label each sub-category above the bottom line of each bar.
  • Label each bar with the profit ratio below the bottom line of each bar.
  • Add a filter by region. Make sure the filter is centered on the dashboard above the chart.
  • Color the bar gray if it above zero (#ACBAC3) or pink if it is below zero (#E48070).
  • Match tooltips.

Dataset

This week uses the superstore dataset for Tableau 2018.3.  You can get it here at data.world

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday2018 and tag @AnnUJackson, @LukeStanke, @lorna_eden, @curtisharris_, @RodyZakovich, and @VizWizBI!

Track your progress

Also, don’t forget to track your progress using this Workout Wednesday form.

Week 47: Unit Volume Comparison

Why wait for 2019 when I can start challenging you all right now? I’m not quite ready to jump off the set action hype train yet, and this challenge is setup to help you think about some different ux/ui capabilities that set actions can enable. I don’t anticipate this being the most difficult challenge you’ve faced… so grab a drink, sit down, and let’s get to work.

click to view on Tableau Public

NOTE: I disabled download on the workbook on Tableau Public to force you to think through the solution. Yes, I know it’s mean, but you’ll learn more this way. I’ll turn on downloading toward the end of the week.

Requirements

  • Dashboard size: 900 x 700
  • Use no more than 3 sheets
  • Match text formatting and colors (doesn’t have to be exactly the same)
  • Give every object some room to breath from the edges of the dashboard… 25px sounds about right
  • Summary numbers and highlights should line up perfectly; only separated by the borders of the highlights
  • Try and use set actions to match the functionality
  • Do not display headers for the summary number section
  • Add context to the summary numbers in the leftmost cell only
  • Make sure the word UNITS appears next to the nearest 500 of the highest point on the line
  • Show labels for matching months on hover… if you hover over June 2018, we should see labels for all of the June points
  • Match line/area chart look and feel

DATA SET

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

SHARE

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday2018 and tag @VizWizBI, @AnnUJackson, @LukeStanke, @RodyZakovich, @lorna_eden, and @curtisharris_.

TRACK YOUR PROGRESS

Also, don’t forget to track your progress using this Workout Wednesday form.

Week 46: America’s Aging Population

It’s been way too long since I’ve given you all a challenge. I’ve really enjoyed learning set actions the past two weeks, but if you know anything about me, you know I love table calcs. So guess what? I’m back with a table calcs challenge for you; I know deep down you’ve missed them.

In this week’s Workout Wednesday, you have to rebuild this chart I made for Makeover Monday week 45.

click to view on Tableau Public

Click here to see the original on my blog. NOTE: I disabled download on the workbook on Tableau Public to force you to think through the solution. Yes, I know it’s mean, but you’ll learn more this way.

Requirements

  • You may ONLY use table calcs. NO LODs.
  • Dashboard size: 800 x 700
  • You may only use one sheet.
  • Match the title, column headers and row headers.
  • You need to show the sex across the view and origin down the view. Make sure your sort order matches.
  • Each line represents the percentage of the total population for that age group for that year.
  • Each line must have a dot on the end.
  • The labels must be on the outside ends of the lines. The labels should be displayed as percentages to one decimal place. These are Tableau Medium 8pt. They must match the color of their respective lines.
  • Make sure the labels have enough space to display. You MAY NOT manually fix the axis.
  • I should only see 2016 and 2060 on the axis. There needs to be light grey gridlines for each of those two years.
  • For each section where the older generation (65+) crosses the younger generation (Under 18), you need display a black dot on the year that 65+ overtook Under 18.
  • You must display a dashed line with the year on the bottom right of the line for those lines that cross. The line needs to be at the same year as the black dot.
  • Match the tooltips (they show the year, the total population for each gender, and the percentage of the population for each gender.
  • The orange color is #E85839 (for 65+). The blue color is #3B6A9C (for Under 18).
  • Only show horizontal divider lines; no vertical divider lines.

DATA SET

Data from this week comes from Makeover Monday week 45 on data.world. Download here if needed.

SHARE

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday2018 and tag @VizWizBI, @AnnUJackson, @LukeStanke, @RodyZakovich, @lorna_eden, and @curtisharris_.

TRACK YOUR PROGRESS

Also, don’t forget to track your progress using this Workout Wednesday form.

HINTS

  • You will need a dual-axis chart, both of which are table calcs.
  • All four data points in the tooltip require table calcs.
  • The dashed vertical line requires a table calcs.
  • Create calculations to offset the years to give the ends of the lines enough space to display the labels properly.

Week 41: Top & Bottom Highlights

This week’s workout is designed for the end user looking for immediate insight – think of an executive stakeholder or someone more drawn to quickly getting numbers and results.  These folks don’t necessarily have the time to look deeper into the details, but are still craving data in context.

To satisfy their requests you’ll be creating a small multiples dashboard that highlights different combinations of dimensions based on what the user selects.  It also has strategically placed labels that give the most pertinent information – total sales for the chart shown and the most recent monthly measurement.

Click to view on Tableau Public

Requirements

  • Dashboard size: 1200 x 900
  • Create small multiples showing monthly sales from 2017 & 2018 by Category and Region
  • Create color highlight to meet these 6 conditions
    • Highlight top category per region (by sales)
    • Highlight bottom category per region
    • Highlight top & bottom category per region
    • Highlight top region + category combination
    • Highlight bottom region + category combination
  • Create a label that shows the Total Sales in the top middle of each small multiple
  • Create a label that shows the most recent sales in the lower right of each small multiple
  • Create a dynamic title that changes based on the highlight chosen
  • Match tooltips and interactivity – mark type matters!
  • Match all formatting

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI if you have space, he would love to see your work too!)

Also, don’t forget to track your progress using this Workout Wednesday form.

Week 40: Where are Sub-Category Sales Down?

Challenge

This week you are building something that looks like a text table. But there are a few twists, including the fact you cannot use text as a mark type.

click to view on Tableau Public

 

Requirements

  • Use the shape mark type.
  • Do not create a custom mark type that is transparent.
  • Round sales to the nearest dollar. Make sure the values are right-aligned.
  • Make sure to add banding that alternates from sub-category to sub-category.
  • Place a red arrow down (▼) to the right of sub-category sales that are down compared to the year previous.
  • Place a red arrow down (▼) in front of a sub-category label in the table if sales were lower in 2018 compared to sales in 2015.
  • Show only order dates for 2016, 2017, and 2018 in the table.
  • Colors are Dark gray (#414141), medium gray (#6B6B6B), and red (#F36754)
  • Be able to slice the data by Region.
  • Match tooltips
  • BONUS: embed a visual in the tooltip that shows yearly sales on a continuous axis and has a “▼” on the years where sales were down compared to the year previous.

 

Dataset

This week uses the superstore dataset for Tableau 2018.1.  You can get it here at data.world

 

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI too – he would REALLY love to see your work!)

 

Track your progress

Also, don’t forget to track your progress using this Workout Wednesday form.

 

Week 38: Discovery Dashboard

One of my absolute favorite things about Tableau is that not only is it a fantastic data display tool, but it is amazing at data exploration and discovery.  While you’re in the flow of analysis there are tons of built in features that provide you feedback, awareness, and insight into your data.  Everything from displaying the number of marks on a sheet in the lower left corner (along with the sum of a measure) to exposing the worksheet summary card.  You can customize it to show you so many options and it’s one of the first tools I use when getting hands on with new data.

But what if you want to enhance your end-users’ capabilities and provide them with the same interaction you’re afforded in desktop?  Enter this week’s challenge: the Discovery Dashboard.  Designed off of a scatterplot, it’s goal is to give interactors the same features, insights, and tools that you passively have access to – all from Server and without the necessity of desktop or knowledge of how to develop.

This week your challenge is to recreate this guy (this is animated, so give it a moment!):

click to view on Tableau Public

Requirements

  • Dashboard size: 1100 x 900; 4 sheets tiled
  • Create a scatterplot of Sales vs. Profit with Segment on color
  • Create BAN of total marks, total sales, total profit
    • Include supporting information (min, max, slicing information)
  • Create controls that allow the user to
    • Change how the data is sliced (scattered)
    • Separate out segments to different rows
    • Separate out years to different columns
    • Add or remove reference lines
  • Match titles of each axis
  • Match tooltips
  • BANs should respond to selection inside of the scatterplot
  • Don’t forget the color legend & line formatting!

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI if you have space, he would love to see your work too!)

Also, don’t forget to track your progress using this Workout Wednesday form.

Solution: Paying The President

We’re working on providing different solutions for the rest of the year. While it’s not a guarantee that we’ll have one every week, we want to dispel any myths around the difficulty of the problems.

Last week Curtis made a video on how he created the solution. He’s going to do this every week. Curtis didn’t get it perfect but that’s okay it’s really close!

I’m not going to show you how to do every part, but I will show you a few tips that will get you going!

First let’s review the modified brief that I’ll use for this demo:

  • Dashboard size: 900px x 620px.
  • Background color: #F9F8F7
  • The data has unknown dates. Make all unknown values show up 3 months past the maximum date. If you need help see SPOILERS #1 below for the formula.
  • Create the stacked rectangle plot at the Source level. Use Size to size the boxes. Place a space of 0.01 between each of the squares. Make sure the order of the boxes matches, too. *This is the key challenge this week*
  • Create an “axis” that labels the start of each year as black and abbreviated month labels of April, July, and September, respectively. Also label the unknown values with “Unknown”. See SPOILERS #2: for help with the “axis”. And see SPOILERS #3 for the month label.
  • Color by source_group: Donald J Trump For President: #F7C480, Other: #76B7B2, Taxpayers: #555555
  • Add annotations for when Trump announced candidacy, gets nomination, the election, and inauguration. You’ll want this: ▼
  • Add the annotation around incomplete/missing data.
  • Add the divider and bracket on the dashboard.
  • Match tooltips.
  • Credit the original authors/designers and link to the original:
    Originally by Derek Kravitz and Derek Willis, ProPublica, and Paul Cronan, Mark Schifferli and Charlie Smart, Fathom Information Designhttps://projects.propublica.org/paying-the-president/.

So were talking about just 3 points. And I give you help with two of them!

Step 1: Unknown Dates

First you need to figure out the unknown dates.

IFNULL([Date], DATEADD("month", 3, {MAX([Date])}))

Put this on Columns and make it date value at the month level.

You’ll end up with this:

Step 2: Create mark logic + add level of detail.

Next were going to figure out the spacing for the marks. The formula utilizes the height of each square and then adds .01. After that we subtract half the hight of the square to center the mark where it should be. The final formula looks like this.

RUNNING_SUM(SQRT([Size]) + .01) - SQRT([Size])

Set your mark type to square and it produces this visual:

The sizing calculation before the appropriate marks are ordered on the marks card.

Next up: Let’s add the correct level of detail to the marks card. Add exact date, source to detail. Source (group) to color, and Size to size. That will give you an imperfect visual where you need to edit the table calculation (be sure to re-order the values).



Once you have edited this you end up with this visual:

It’s almost there!

It’s so close!

Step 3: Dual Axis of MIN(-3) and format.

So were basically there already. Now come’s the trick with the axis. I created a dual axis chart with the second value just an in-line calculation of MIN(-3). Synchronize this and remove all the values from this marks card.

After that you just need to create two calculations. One for the bold font and one for the gray font. Then place these on text on the marks card and format.

Years calculation (also in spoilers):

IF MONTH([Date]) = 1
OR DATETRUNC("month", [Date]) = {MIN(DATETRUNC("month", [Date]))}
THEN STR(YEAR([Date]))
ELSEIF DATETRUNC("month", [Date]) = {MIN(DATETRUNC("month", [Date]))}
THEN "Unknown"
ELSE "" END

Month Calculation: 

IF DATETRUNC("month", [Date]) != {MIN(DATETRUNC("month", [Date]))}
THEN IF MONTH([Date]) = 4
    THEN "APR"
    ELSEIF MONTH([Date]) = 7
    THEN "JUL"
    ELSEIF MONTH([Date]) = 10
    THEN "OCT"
    ELSE ""
    END
ELSE ""
END

Now we just add these to text on marks and format like this:

Year and Month labels.

Then we have this:

Note the faux axis labels.

Step 4: Format

Finally we need to revers our axis, hide our axes, and format. Then we end up with the final product looking like this:

Not bad.

Not bad for 4 steps!

Week 37: Recreating Paying the President

Challenge

This week we’ve partnered with Makeover Monday to examine potential conflict of interest between President Trump’s personal holdings and his campaign staff and government officials using data from Propublica. We’ll also be giving you a few formulas so you can focus on the important parts of the challenge: “stacking” the squares and placing the labels of year, month, and unknown on the “axis”.

click to view on Tableau Public

Setup

1. Create a calculated field called Size. Size will be used to size the squares. The size of the squares represents the overall area of the symbol. There are five different values each representing a different threshold of amount spent at a property.

IF SUM([Amount]) < 1000
THEN 1
ELSEIF SUM([Amount]) <10000
THEN 4
ELSEIF SUM([Amount]) < 100000
THEN 9
ELSEIF SUM([Amount]) < 1000000
THEN 16
ELSE 25
END

Requirements

  • Dashboard size: 900px x 620px.
  • Background color: #F9F8F7
  • The data has unknown dates. Make all unknown values show up 3 months past the maximum date. If you need help see SPOILERS #1 below for the formula.
  • Create the stacked rectangle plot at the Source level. Use Size to size the boxes. Place a space of 0.01 between each of the squares. Make sure the order of the boxes matches, too. *This is the key challenge this week*
  • Create an “axis” that labels the start of each year as black and abbreviated month labels of April, July, and September, respectively. Also label the unknown values with “Unknown”. See SPOILERS #2: for help with the “axis”. And see SPOILERS #3 for the month label.
  • Color by source_group: Donald J Trump For President: #F7C480, Other: #76B7B2, Taxpayers: #555555
  • Add annotations for when Trump announced candidacy, gets nomination, the election, and inauguration. You’ll want this: ▼
  • Add the annotation around incomplete/missing data.
  • Add the divider and bracket on the dashboard.
  • Match tooltips.
  • Credit the original authors/designers and link to the original:
    Originally by Derek Kravitz and Derek Willis, ProPublica, and Paul Cronan, Mark Schifferli and Charlie Smart, Fathom Information Design

    https://projects.propublica.org/paying-the-president/.

 

Dataset

This week uses a modified version of Spending at Trump Properties from Propublica (original data here – don’t use this one). You can get it here at data.world.

 

Share

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI too – he would REALLY love to see your work!)

 

Track your progress

Also, don’t forget to track your progress using this Workout Wednesday form.

 
 

 
 

#SPOILERS

1. For those still learning here is the formula for the spacing the unknown values three months out from the last known month:

IFNULL([Date], DATEADD("month", 3, {MAX([Date])}))

 
2. For those still learning here is the formula on how to create the faux axis:

IF INDEX() = 1
THEN -3
END

Using this INDEX() function allows to only show a single mark and not have a bunch of overlapping marks per month.

3. For those still learning here is the formula for creating the month label:

IF DATETRUNC("month", [Date]) != {MIN(DATETRUNC("month", [Date]))}
THEN IF MONTH([Date]) = 4
    THEN "APR"
    ELSEIF MONTH([Date]) = 7
    THEN "JUL"
    ELSEIF MONTH([Date]) = 10
    THEN "OCT"
    ELSE ""
    END
ELSE ""
END

Week 35: Superstore Small Multiples

We’re wrapping up our month of Community submissions with a workout submitted by Zen Master Neil Richards.  A great way to end an awesome month facilitated by so many members of the Workout Wednesday community.  We’ve definitely been inspired and challenged by your contributions and impressed with the support you’ve given to those completing your workout.

So without further ado – here’s this week’s brief and background from Neil:

This week’s workout is about recreating a small multiple version of a 2×2 quadrant chart. There may be limited uses for such a chart but I’m a great fan of small multiple charts for visual horizon scanning to compare and contrast patterns in data over dimensions. Since the superstore dataset has 49 states included (no Alaska or Hawaii, but District of Columbia is included), we have a perfect dataset for a 7×7 grid.

I recently created an example of such a chart in a submission for #VizForSocialGood which can be seen here. Your challenge this week is to recreate a similar chart using the (US) Superstore dataset which is supplied with every Tableau installation. We will look at profit ratio across 4 category types (splitting the Technology category into Phones and Other Tech) and display as four proportionally sized squares. We will then highlight the category with the highest profit ratio using the colour of the state’s region. You can see the finished viz below – further explanation is given in the top section.

 

click to view on Tableau Public

 

Requirements:

  • Dashboard size: 1000 x 1300 – 2 sheets
  • Create a view looking at profit across 4 categories
  • Split out phones vs. other tech
  • Ensure the category with the highest profit is highlighted with color
  • Color for the highlight should match the state’s region
  • Create a custom legend for the upper right with a larger version of the overall chart
  • Ensure negative profit ratio is expressed as zero

Data from this week comes from the Saved Data Source in Tableau 2018 (Sample – Superstore), download here if needed.

After you finish your workout, share on Twitter using the hashtag #WorkoutWednesday and tag @theneilrichards,  @AnnUJackson, @LukeStanke, and @RodyZakovich.  (Tag @VizWizBI if you have space, he would love to see your work too!)

Also, don’t forget to track your progress using this Workout Wednesday form.