May 24, 2012
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:
Ok, let’s get to it.
Step 1 – Create a list of dates in Excel and open the data in Tableau.
Step 4 - Right-click drag the Date field onto the Row shelf and choose the WEEK(Date) discrete format
Your view should look like this:
Step 5 – Clean up the view a bit by right-clicking on the Date label and choosing Hide Field Labels for Columns
Step 6 – Right-click on the WEEK(Date) pill on the Rows shelf and uncheck Show Header
Your view should look like this:
We’re getting close!
Step 7 – Right-click drag the Date field onto the Text shelf and choose DAY(Date)
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.
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)
Step 10 – Create the data blending relationships. Go to the Data menu and choose Edit Relationships. You will need to create these Custom relationships:
Step 11 – Create a calculation for Profit Ratio by right-clicking on any field and choosing Create Calculated Field
Step 12 – Drag the Profit Ratio measure onto the Color shelf
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
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:
- View any two statistics to look for trends by choosing a primary measure and a comparison
- Filter the time frame to all years, the pre-testing era, and the testing era (1993+)
- Filter the leagues to focus your analysis
- 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:
- HR are on a slow descent in the testing era, especially since 2000
- ERA is in a similar decline, possibly indicating that improved pitches has had as much of an impact as testing
- Batting Average has remained flat. This means that the reduction in HR has not impacted BA.
- Teams are simply scoring fewer runs, likely due to the reduction in long balls
- 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
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)
Step 2 – Open the Show Me window on the toolbar and click on the Highlight Table option
You should see the view below with Days in the columns and Months in the rows.
Step 3 – Click on the swap icon to place Day on the row shelf and the Month on the column shelf
Step 4 – Right click on the Month column label and choose Hide Field Labels for Columns
Step 5 – Drag the Rank measure off of the Label shelf
You should now this view.
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.
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.
That’s it! Six steps, less than 30 seconds, and you have a beautiful heat map.
Give it a shot.
May 14, 2012
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.
- 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
As of today, Tableau will be "sharing one beautiful visual story a day". How cool is that?
Subcription/follow options include:
May 3, 2012
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)
- Download the add-in here
- Extract the contents of the zip to a folder
- Launch PowerPoint
- Click on Tools | Add-ins to bring up the add-ins window
- Click on Add to bring up the 'Add New PowerPoint Add-in' dialog box
- Navigate to the folder where the contents of the zip file was extracted and select 'LiveWeb.ppa' and click on OK.
- 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.
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.
- From the browser address
- 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:
- The viz might be a bit slower to load than when viewed in Public or Server. This viz took about 10 seconds to load.
- 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.
May 2, 2012
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.