VizWiz

Launch, grow, and unlock your career in data
Showing posts with label flow. Show all posts

May 1, 2024

Which chart should you use for your analysis?

No comments

Over on Tableau Public, Judit Bekker create this fantastic directory of charts to help you pick the one that's most appropriate for your analysis.

Check it out below.

April 26, 2024

Jumpy Curvy Things in Tableau

No comments

I received a request to teach how to build a jump plot during Next-Level Tableau office hours. The idea was to recreate this visualization that I created for Makeover Monday back in 2018.

The problem, though, was that the data preparation was done in Alteryx, which I no longer have a license for. Thanks for a member of NLT that had an Alteryx license, we were able to decode what the workflow was doing.

Then, in office hours, we recreated the data prep in Tableau Prep before building the visualization in Tableau. Download the Prep flow here. Download the workbook below.

This is just one example of one thing learned as a member of NLT. Sign up today and I guarantee you'll become a Tableau expert.

August 7, 2018

Makeover Monday: And The Ice Melts Away (as a Radial Chart)

No comments
The second session we had at the DS today was taught by Laine Caruzca and she showed us how to build a radial chart in Tableau based on this viz she created for Makeover Monday week 20:


I'd never built a radial chart from scratch before, so I was excited to learn to build a second new chart type today. In Laine's tutorial, she used the Custom SQL option that's available in the Legacy data connector in Tableau for Windows. However, there's no custom sql option on a Mac, so I decided to create the data structure using Tableau Prep.

Download the Flow here

This is a pretty straightforward workflow. You split the data into parts to create the start and end points, then union them back together, along with some cleanup along the way.

Laine provided all of the details of the table calcs and the bin needed to create the curves, so I follow her steps using the Arctic Sea Ice Extent data from Makeover Monday week 15. That worked rather perfectly!

From there it was on to the polish. I love Pablo Gomez's style, so I used this radial chart viz of his as inspiration for the overall design, and then I used the wording from Arpit Arora's Makeover Monday viz about the same topic to help frame the messaging.

July 18, 2018

Financial Times Visual Vocabulary: Tableau Edition

2 comments
We're all in the never ending search for resources that will help us pick the "best" chart for the situation. The Financial Times Graphics team created the Visual Vocabulary to help all of us make better chart choices.


Over the past month, I've been building all of these charts in Tableau so that everyone in the Tableau Community would have examples they could use and learn from. This has been quite the labor of love and I would like to thank the (best) team at The Information Lab for their support, reviews and feedback along the way.

There are 72 charts in total, most of which I built myself or with help of tutorials from the community. To build the violin plot, equalized cartogram, and heat map examples, I prepared the data in Alteryx and the output was shape files. The scaled cartogram was built using Tilegrams by Pitch Interactive based on this tutorial from Ken Flerlage.

While the people listed below may not have been the original creators of the charts, they are the resources I used to create the charts in my workbook.

Chart
Person
Link
Diverging Stacked Bar Steve Wexler Data Revelations
Surplus/Deficit Filled Line Jeffrey Shaffer Data +Science
Violin Plot Ben Moss YouTube / Alteryx App
Sunburst Chart Leonid Golub Super Data Science
Arc Chart Ken Flerlage KenFlerlage.com
Venn Diagram Leonid Golub Super Data Science
Radar Chart Adam McCann Dueling Data
Scaled Cartogram Ken Flerlage KenFlerlage.com
Sankey Diagram Leonid Golub Super Data Science
Chord Diagram Noah Salvaterra DataBlick

How to use this workbook

  1. Start on the Visual Vocabulary tab.
  2. Click on the text in any section to get to the chart types associated with that topic.
  3. To go back to the beginning, click on the Visual Vocabulary tab (NOTE: I'll add dashboard navigation buttons once Tableau releases that feature.)
  4. You should be able to swap your data out for any chart type fairly easily.
  5. Give credit to the creator of the chart as appropriate.
  6. If you want to see how that charts are built, email me and I'll we can have a chat.

This has taken up a tremendous amount of my time, so I would appreciate it not being downloaded and then re-posted as if it's your own work. If you see someone has done that, please tweet me with a link to the person/page that has done so and I'll take it from there. Feel free to show these charts to customers and prospects to show the capabilities of Tableau. 

Notes

  • This is NOT meant to be an exhaustive list of charts that can be built with Tableau. This is based on the charts created by the Financial Times for the Visual Vocabulary.
  • Actions are quite slow to respond on Tableau Public. If you download the workbook, it's much more responsive. 
  • There's a mobile version as well.
  • Images of each set of charts can be found on Google Photos.

If you find what I've created useful, please share a link to this blog post to them. Any feedback you have is very much appreciated. Click on the gif below for the interactive version. Enjoy!


June 13, 2018

Workout Wednesday: Do Customers Spend More on Their First or Second Purchase?

No comments
Ann is back for Workout Wednesday week 24. The full list of requirements can be found here. Personally, I like how this week's challenge included Tableau Prep. It's great to have an excuse to practice!

The high-level requirements:

  1. Create a data set in Tableau Prep that returns the first and second order for each customer along with the sales, number of categories and number of products sold on that day. 
  2. The data must be wide rather than tall. That is, you must have nine columns in total: Customer ID, two dates, two sales totals, two category counts, two product counts.
  3. Create a dashboard with a scatterplot and two strip plots.
  4. Float everything...YUCK!

Here's what my flow looks like from Prep:
I intentionally did NOT rename my tools so that you wouldn't know exactly what I did. You can see my final output below the flow.

Building the viz was pretty simple. Scaling the axes the same is something I do a lot, but I do expect that to trip up people. Creating the 45º line is something I've written a tip on before, but Ann's has a twist as it has to be behind the dots. Sneaky!

The sucky part was floating everything. I started by tiling everything, literally writing down the position and size for each element. Then I floated them one by one and entered what I wrote down to put them back in their proper position. From there, it was a little bit of tweaking to move the axes closer together.

Nice challenge. It wasn't overly complex and required me to reach back into the memory bank.

June 5, 2018

Tableau Tip Tuesday: Split, Pivoting and Union with Tableau Prep

No comments
Now that the manuscript of the Makeover Monday book (pre-order here) has been sent to the publisher, I'm going to do my best to get back into a rhythm with weekly tips. This week, I'm going to show you how I used Tableau Prep to prepare the data for my Makeover Monday viz this week. It involves splitting eight columns into two sets of four, renaming fields, pivoting the data, and then unioning it all back together.

You can download the flow here.

March 9, 2013

Where do American’s commute to work? An interactive map of county-to-county commutes.

5 comments
Testing the limits of Tableau can be quite fun, especially when you’re given free reign to use any data set.  Yesterday I wanted to test map rendering capabilities between Tableau 7 and Tableau 8. 

Our mission at Facebook is to “make the world more open and connected” and I thought a great way to look at connectedness is through commuter flows.  I built the map below, which contains 255K+ lines, using census data about American commuters (this is census data, not Facebook data).

My initial test results for this example reveal:
  1. Tableau 8 is not noticeably faster than Tableau 7, even with the OpenGL graphics turned on.  This is the case both on Desktop and Server.
  2. There’s a bug in 8 that is prohibiting worksheets from dynamically sizing within a container.  The basically kills the ability to show/hide viz types dynamically using containers and parameters.

From Brian McKenzie’s working paper:
Workplace information is crucial for understanding the degree of interconnectedness among our nation’s communities. Commuting plays an important role in the larger interchange of people, goods, services, and information across places, and helps shape the contours of metropolitan and micropolitan statistical areas.
The Census Bureau produces county and MCD-level commuting flow tables every five years, using non-overlapping 5-year ACS estimates beginning with 2006-2010.

To give you an idea for how I am using this, consider this question: Where do people travel from that want to come to the Silicon Valley (San Mateo County, CA)?

To do this I:
  1. Filter the Workplace State to California.  This will reduce the Workplace County list to only counties in CA.
  2. Filter the Workplace County to San Mateo.

image

From this, I wanted to only see where a large number of commuters were coming from, i.e., the most frequent commuters to Silicon Valley.  I filtered out the Average Commuters of 1-100 and 101-500.

image

This is interesting.  As I would expect, there are a lot of commuters from the closest counties.  However, there’s a significant number of people that commute from LA.  Fascinating.

Switch to the Dots view if you don’t want to see the lines.

image

Another nice looking viz is: Residence State = Georgia with 501 average commuters and higher.  There are not loads of people traveling outside of Georgia, but then again, it has a lower population than CA (there’s a population bias in the data).

image

Give it a try with where you live and work.  Share an image of your findings.  Note that this initial view is filtered to those residing in CA so that it will draw in a reasonable amount of time.  Once it loads, check (All) for Residence State and see all commutes in the US.  It’s pretty cool.


Download the data here and the workbook here.

January 12, 2013

Creating Stream Graphs in Tableau 8 in 6 simple steps (it works in Tableau 7 too, but doesn’t look as cool)

5 comments

Today I attended Andy Kirk’s “Introduction to Data Visualisation” course, learning a lot about data visualization and constructing stories with data.  One of the topics Andy covers is “Establishing editorial focus with your subject matter”.  During this section Andy showed the now famous stream graph created by the New York Times which visualized box office receipts from 1986-2008.

So at the next break I thought “Hmm…I wonder if I can build a stream graph in Tableau 8” and about 3 minutes later I had the basics built. 

First, you should know that Wikipedia defines a stream graph as “a type of stacked area graph which is displaced around a central axis, resulting in a flowing, organic shape.”  The NYT graph has nice smooth curves from one point to the next, however Tableau doesn’t support smoothed lines.  Bearing this in mind, let me present you with my first stream graph.

There are two particularly nice new features of Tableau 8.  The experience is better in Desktop (or Public) than Server, so if you have the beta, download this workbook and you’ll see what I mean.

  1. Try out the zoom controls.  When you lasso zoom, there’s a really smooth transition.
  2. In Desktop, as you scroll your mouse across the chart, you see dots at the top and bottom of the band for the color you’re over for that day.  It’s super fast and gives you a quicker sense of the height of the color.  Really well done Tableau!

    image

You might be asking how I did this.  It actually is simpler than you might think.  Here’s how you would create a stream graph of Sales based on Order Priority.

Step 1 – Drag Order Date to the Columns shelf, right click on it, and choose Exact Date.

Step 2 – Create a calculated field that determines which Order Priorities go up and which go down.

image

The trick here is to put a negative in front of sales for some of the Order Priorities.

Step 3 – Drag your new calculated field to the Rows shelf.

Step 4 – Drag Order Priority onto the color shelf (and change the colors if you want…I used the Color Blind palette).

Step 5 – Change the Mark Type to Area

You should now have something like this, which technically is a stream graph and we’re done.

image

I don’t like the look of this though.  It’s way too jagged and I’d like to smooth it out a bit.  Moving averages are useful with time-series data to smooth out short-term fluctuations (Wikipedia).  A 30-day moving average calculation should do the trick since this is four years worth of data.  A 7-day moving average when there’s a shorter time period (like one year or less) works well, or whatever makes sense for your data.

Step 6 – Right click on the Sales by Order Priority pill on the Rows Shelf and choose Add Calculated field. 

image

And you’re done.  You should now have a stream graph that looks like this:

image

For my version above, I did a few more things:

  1. Lots of formatting and cleanup
  2. Played around with the colors to get them the way I wanted (blues on top, oranges below)
  3. Created two parameters that allow the user to pick (1) dimensions to slice the data by and (2) measures to analyze.
  4. Added a time slicer
  5. Put it all on a dashboard, added some annotations, etc.

I’ve yet to convince myself where I’d use these in a business context, but at least I now know how to build them.  How would you use them?