VizWiz

Launch, grow, and unlock your career in data

May 24, 2012

Creating an interactive monthly calendar in Tableau is easier than you might think

26 comments
If you’re not following the InterWorks blog, you should be.  They routinely crank out fantastic tips and tricks for Tableau.  Dustin Wyers, a BI Analyst for InterWorks, recently wrote about “Creating Calendar Views in Tableau”. 

Dustin’s post does an excellent job of taking you through creating a calendar viz step-by-step.  But I felt it fell a bit short in the end since you didn’t actually see a calendar.  Dustin’s end product looks like this:
Interworks Calendar
I wanted something that looked more like a true calendar.  I did so utilizing some of the techniques I outlined recently for creating a heat map, but also adding in some of the suggestions by Joe Mako.  The end result, if you follow the tutorial below, will look like this:

image

Ok, let’s get to it.

Step 1 – Create a list of dates in Excel and open the data in Tableau.

image

Step 2 – Right-click drag the Date field onto the Column shelf and choose the MY(Date) discrete format

image

Your view should look like this:

image

Step 3 - Right-click drag the Date field onto the Column shelf and choose the WEEKDAY(Date) discrete format

image

Your view should look like this:

image

Step 4 - Right-click drag the Date field onto the Row shelf and choose the WEEK(Date) discrete format

image

Your view should look like this:

image

Step 5 – Clean up the view a bit by right-clicking on the Date label and choosing Hide Field Labels for Columns

image

Step 6 – Right-click on the WEEK(Date) pill on the Rows shelf and uncheck Show Header

image

Your view should look like this:

image

We’re getting close! 

Step 7 – Right-click drag the Date field onto the Text shelf and choose DAY(Date)

image

Step 8 – Align the Text to the top right, center the header for the WEEKDAY(Date (copy) field, re-size the view a bit and we now have a beautiful calendar.

image

Ok, sweet, we have something that looks exactly like a calendar, but so what?  This doesn’t tell us anything. 

Consider that you want to see the profit ratio for your sales (or any other metric) displayed on each day as a color.  This is where data blending comes in handy. 

Step 9 – Connect to the Superstore Sales data source (or any other data you want to use, as long as it has a date field)

You might ask at this point why I used a separate data source for the calendar dates when a Date field exists in the Superstore Sales data.  The reason is quite simple.  The Superstore Sales data does not have sales for every day.  Therefore I will not see the Day labels on each of the boxes.  For example, if there are no sales on January 13, 2009, then the 13 label on that day will be blank.

Step 10 – Create the data blending relationships.  Go to the Data menu and choose Edit Relationships.  You will need to create these Custom relationships:

image

Step 11 – Create a calculation for Profit Ratio by right-clicking on any field and choosing Create Calculated Field

image

Step 12 – Drag the Profit Ratio measure onto the Color shelf

Step 13 – Change the Mark Type to Square

Step 14 – Set the size to its maximum

image

That’s it!  You must admit this is pretty cool. 

Note that Tableau defaults positive and negative colors to the Red-Green palette; you might want to change it for those color blind folks out there (and to keep Steve Wexler off your back).

If you want to take it a couple steps farther, you could show the quick filter for the MY(Date) field, create a parameter to allow for any of several metrics to be chosen, and on an on to make it a truly interactive analysis.

In the version embedded below, I changed the color palette to Red-White-Green so that those days without any sales would be white instead of gray.

Try this with your own data.  I bet your users will find this incredibly useful, especially as a performance monitoring tool.

May 16, 2012

Is drug testing working in baseball? An interactive analysis.

2 comments

Cork Gaines wrote about the HR trend in baseball since testing started for performance enhancing drugs.  He presented a chart of the trend (surprising effective given his past charts), but he never answered his own question….is testing working? 

One way to determine the answer is through comparisons to other statistics.

I downloaded the season averages across both leagues and MLB in total from baseball-reference and built this interactive analysis.  The stats are order by batting stats then pitching stats.

This viz allows you to compare home runs to many other statistics through the selectors at the top right.  In addition you can:

  1. View any two statistics to look for trends by choosing a primary measure and a comparison
  2. Filter the time frame to all years, the pre-testing era, and the testing era (1993+)
  3. Filter the leagues to focus your analysis
  4. Click on a league at the bottom to highlight that league

In this initial view of HR vs. ERA, I see a couple of things:

  1. HR are on a slow descent in the testing era, especially since 2000
  2. ERA is in a similar decline, possibly indicating that improved pitches has had as much of an impact as testing
  3. Batting Average has remained flat.  This means that the reduction in HR has not impacted BA.
  4. Teams are simply scoring fewer runs, likely due to the reduction in long balls
  5. The trend in complete games is despicable

What do you see?  Play around with the different stats and see if you can draw any conclusions.

May 15, 2012

Tableau Tip: Create a beautiful heat map in under 30 seconds

2 comments

This tip is a follow up to my post about asking How common is your birthday?.  In this post, I created a heat map and Matt Stiles asked me if I could write a tutorial showing how I did it so quickly in Tableau.

The steps are for creating the viz only.  I’m assuming you already connected to the data.

Step 1 – Hold the CTRL key and click the Day, Month and Rank fields (they should all be highlighted after you choose them)

image

Step 2 – Open the Show Me window on the toolbar and click on the Highlight Table option

image

You should see the view below with Days in the columns and Months in the rows.

image

Step 3 – Click on the swap icon to place Day on the row shelf and the Month on the column shelf

image

Step 4 – Right click on the Month column label and choose Hide Field Labels for Columns

image

Step 5 – Drag the Rank measure off of the Label shelf

image

You should now this view.

image

Step 6 – Double click the color shelf to show the Edit Colors window.  Choose Orange from the Pallet list and the Reversed option, then click OK.

image

You need to choose the reverse option if you want the highest ranking days to be the darkest.  You final view should look like this.

image

That’s it!  Six steps, less than 30 seconds, and you have a beautiful heat map. 

Give it a shot.

  • Get the data here
  • See my final viz (including interactivity) here

May 14, 2012

How common is your birthday? Find out exactly with an interactive heat map.

43 comments


Matt Stiles posted a heat map on his blog yesterday that I thought was pretty well done.  I decided to get the data from NYTimes.com and recreate it in Tableau.

It takes under 20 seconds and under 10 clicks to create it in Tableau, more like 15 seconds if you’ve been using Tableau longer.

Matt chose a brownish color palette, but I wanted to try lots of different colors.  Tableau makes is incredibly simple to try out many options very quickly.  I tested green, blue, gray and orange-blue palettes before settling on an orange palette.  For my eye, the orange palette made distinguishing the colors easiest.

Creating this as an interactive viz in Tableau allows you to provide the reader/viewer/interactor with more information.  Hover over your birthday and you will see exactly where it ranks.  Try it! 
In a static version, you’re left to guess at the approximate range in which it falls.


Check out Matt’s post and the comments.  There are some interesting insights from the readers including:

  • Matt struggled with getting the colors just right using Illustrator.  With Tableau, it’s all built in.  There’s no need to tinker.
  • Doctors apparently don’t like having their vacations disturbed.  Check out how around major holidays (July 4th, Thanksgiving, Christmas) there a fewer babies born.
  • September clearly has many of the top days (in fact it has all of the top 10), but July and August aren’t far behind.  It looks like people conceive during all of those Thanksgiving, Christmas and New Year’s parties.
  • A reader noted that the 13th seems to be least common on average.  Perhaps that’s because many people see that as an unlucky day.

May 11, 2012

Get your Tableau Viz of the Day and get Tableau daily goodness

1 comment
If you're anything like me, you love finding awesome, innovative Tableau visualizations.  I get so much inspiration from the Tableau Public Gallery and an ever growing list of bloggers.

As of today, Tableau will be "sharing one beautiful visual story a day".  How cool is that?

Subcription/follow options include:
Their first daily viz is by Ben Jones of Data Remixed.  If every viz of the day is anywhere near the quality of Ben's, we're in for a real treat.


May 3, 2012

Tableau Tip: Embedding a Dashboard in PowerPoint in 8 simple steps (Yes, you read that right!)

28 comments

Yesterday I wrote about a method for embedding a presentation within a Tableau dashboard.  Of course, this spawned the opposite question:
Is there a way to embed a Tableau Dashboard in a PowerPoint presentation?
Good news!  The answer is YES!  Here’s how.

Step 1 – Install the LiveWeb PowerPoint add-in (instructions via LiveWeb)
  1. Download the add-in here
  2. Extract the contents of the zip to a folder
  3. Launch PowerPoint
  4. Click on Tools | Add-ins to bring up the add-ins window
  5. Click on Add to bring up the 'Add New PowerPoint Add-in' dialog box
  6. Navigate to the folder where the contents of the zip file was extracted and select 'LiveWeb.ppa' and click on OK.
  7. You might be prompted with the macro virus warning. Enable the macros. When the Add-in is properly loaded, it will display a 'X' against the add-in name.
That's it. You have successfully loaded the add-in.  You should see the LiveWeb add-in appear on the “Insert” tab of PowerPoint.


Step 2 – Go to your Tableau dashboard (either on Tableau Public or Tableau Server) and copy the URL link for the viz. 


You have two options for getting the URL for the viz.
  1. From the browser address
  2. Click on the Share button on the bottom left of the viz and copy the Email link

Step 3 – Go back to PowerPoint and click on the Web Page option on the LiveWeb add-in.  A wizard will appear.

Step 4 – Enter the URL for your viz from Step 2, click Add, then click Next





Step 5 – Choose the “Yes, refresh web page automatically” option.  This ensures that your viz updates live from the source (Public or Server) each time you launch the PowerPoint presentation.  Click Next. 


Step 6 – Choose the size and position of the viz in the slide.  I prefer 100% so that the viz is as big as possible, but the default is 90%.  Click Next.


Step 7 – Click Finish


You should receive the following message if you successfully embedded the web page.


Step 8 – Launch the presentation


Some notes and observations:
  1. The viz might be a bit slower to load than when viewed in Public or Server.  This viz took about 10 seconds to load.
  2. It can be tricky to get the mouse pointer to show up.  You’ll have to play around with it to see what I mean.
That’s it!  Good luck and enjoy!

May 2, 2012

Tableau Tip: Embedding a Presentation in a Dashboard

13 comments

Monday night I had the honor of running a training session for the LA Tableau User Group.  You can download the presentation and Tableau workbook here.

One of the features of Tableau that I showed them was a PowerPoint presentation embedded in a Tableau dashboard.  I use this technique quite often as it allows me to stay in one tool, thereby negating the need to flip back and forth to PowerPoint.

In this blog post, I will review the steps to use this functionality.   

This example assumes you are using Google Docs to host your presentation.  This technique also works with presentations hosted on SharePoint.  Any other web-based presentation solution should work as well.

Step 1 – Create a new dashboard in Tableau

Step 2 – Navigate to your presentation on the web and open it


Step 3 – In Google Docs, click on Start Presentation


Step 4 – Click on the URL to highlight it, right-click and choose Copy


Step 5 – Go back to Tableau and drag the Web Page object onto the blank dashboard


Step 6 – Once you drop the Web Page object onto the dashboard, the Edit URL window appears.  Paste the URL for your presentation (from Step 4) and click OK.


That’s it!  Your presentation is now embedded within a Tableau dashboard.


If you don’t like the black space to either size of the presentation, the optimal size for the window (assuming you’re using a presentation from Google Docs) is 792 x 600.


Give it a shot.  I bet you’ll use this over and over again.