Building My Tableau Journey

In a break from the norm, this isn’t a #WorkoutWednesday solution guide, but it is a solution guide of sorts. This time I’m going to share how I put together the core section of my “My Tableau Journey” viz. This is a viz I put together to introduce myself at the virtual TUGs I’ve recently presented at. Rather than talk through a slide deck, I figured showcasing myself through a viz was much more appropriate.

The #datafam Tableau Community is all about sharing, supporting and inspiring others. Sarah Burnett’s CV viz heavily inspired my core layout, which I’ve attributed both on the viz itself (bottom left) and via the inspiration link on the Tableau Public page. Sarah even encouraged ‘stealing like an artist’, by providing a link to the Google Sheet she’d used to store the data for her viz. So that’s exactly what I did, I took her file from google, downloaded her dashboard, connected the two, then started modifying the data to meet my needs.

The data

Sarah’s Google Sheet contains multiple tabs, where each tab corresponds to a section of her viz. In my viz I made use of the following tabs only

  • Overview
  • Community
  • Roles
  • Contact

and I naturally changed to data to be relevant to me.

I also created a new sheet labelled Milestones which provides the data I need for the central part of my viz – the ‘dangling baubles’.

This contains the following fields

  • Milestone ID – just a unique identifier for each row
  • Start Date – the date the milestone started
  • End Date – the date the milestone ended, but in most cases this just the same as the start date
  • Type – just a classification I thought I might use, but didn’t
  • Milestone – short description of the milestone
  • Milestone Wrapped – To be displayed as the label on the viz, so the same text but just with some explicit carriage returns so the text wraps
  • Details – Further info that is displayed in a Viz in Tooltip. This also has explicit carriage returns in places so the text displays as I wanted.
  • URL – a link to a web page for further info, but again actually unused in the end
  • Random – used to determine where the ‘bauble’ will display. Nothing clever about this, simply a number entered via trial and error to provide a ‘nice’ looking display.

The data sheet is available here.

I’m not going to document the build of the whole viz. Instead I’m going to focus on the main section only – The ‘dangling baubles’.

This is actually split into 2 sheets – one to display the timeline of my job history, and the other to display the baubles.

Job History Timeline

This uses the Roles sheet as the data source.

Now, for the first 20 years of my career, I was at the same company, but Tableau only featured in the last 8 of it. So the Start Date I recorded in the data set against RM is based on the Tableau part of it. This meant that I didn’t have a long period of time with no milestone activity.

Add Start Date to Columns and set to the continuous Day level (green pill). This level of date granularity works for me as I set my milestone start dates to a day level which could be mid-month. If you set all your milestones to start on 1st of month, then a month level date granularity would probably work fine instead.

Add Role ID to Rows.

I created a parameter to use to control what date I want to use as the maximum end date in this viz. This is essentially a hardcoded value and as and when I add more milestones into the data, I’ll adjust the parameter. If I used TODAY() (or a calculation based off of that function) which I typically would do if I was developing a business dashboard, then this viz would eventually over time start to squash up and not look as I hoped.

pTimelineEnd

date parameter defaulted to 31 Dec 2022 (I chose this as the default based on the spread of the data I currently have in the data set I’m working with).

I’m obviously still at my current job, so I added a future end date into the source data set. I don’t want to use this value, so created

Revised End Date

IF [End Date]<= [pTimelineEnd] THEN [End Date] ELSE [pTimelineEnd] END

With this, I was then able to create

Duration

DATEDIFF(‘day’,[Start Date], [Revised End Date])

which I could then add to the Size shelf of my viz. I then manually changed the colour of the marks, set the border to none, and reduced the size to make the gantt bars thinner.

To add the circles, I added Revised End Date (set to the continuous Day level again) to Columns. Make the chart dual axis and synchronise the axis. Remove the Measure Names field from the All marks card, that was automatically added.

On the Revised End Date marks card, remove the Duration field from Size, and change the mark type to shape and manually increase the size of the mark. Add Current field to Shape.

While one of the default shape palettes does contain filled shapes, I also want to use an ‘open’ shape that doesn’t show the other mark underneath. As a result I ended up creating my own circle shapes and added as custom shapes to achieve this. The ‘open’ circle shape is actually a white filled circle with an aqua border.

Next I want to create a label for each row. Add Company to the Label shelf of the Start Date marks card. Expand the row height a bit to give a bit of room.

Now I want to show the label on top, and left aligned to the edge of the bar. Adjusting the label alignment doesn’t help. Left align and top puts it on the left hand side 😦 Left align also extends the left hand part of the time line to start from 2011.

I pondered about this for a bit. I was vaguely aware of ways I could achieve this, but then I just decided I could manually move the label. This isn’t something I do often, as usually I’m building a business dashboard where the data can change which in turn can change how the viz is displaying. In this instance, the data in this viz isn’t going to change without me controlling that change. So why spend the time building something complex when it isn’t needed….?

Make sure the label is right aligned (otherwise the left hand side of you date axis will extend further back than you might want), then just click on the label text you want to move and when the cursor changes to a crosshatch, click and drag the text to re-position (you may need to adjust the row height some more).

Hide the Row ID column and remove row & column dividers. Hide all tooltips. The final viz does make use of Viz in Tooltips but I won’t walkthrough that part at this point. I’m going to leave the axis on display for now. Name the sheet Jobs.

Milestones

This viz uses the Milestones sheet as its data source.

Add Start Date to Columns and set to the continuous Day level (green pill). Add Random to Rows. Change the mark type to Circle and change the colour and set the border to None..

Add another instance of Start Date to Columns and set to dual axis and synchronise the axis. Change the mark type to Bar, change the colour and set the border to None. Add Milestone ID to the Detail shelf of the All marks card to ensure we have 1 mark showing for every ‘row’ of data (some milestones happen on the same date).

Edit the Random y-xis, and check the Reversed checkbox to invert the axis.

The ‘dangling baubles’ are starting to come to life 🙂

Now when I add this to a dashboard, I will want the Jobs viz to display on top of this one, in such a way that the vertical lines look to connect to the horizontal lines on the jobs timeline. As a consequence, I need to add some extra ‘room’ at the top of this chart. so none of the baubles are too close to the 0 line.

Rather than adjust all the values in the data source, I created a parameter

pAdjustor

Integer parameter defaulted to 10

I then created

Random + Adjustor

[Random] + [pAdjustor]

and replaced the Random field on the viz with this new field. (I had to reinvert the axis again) By using the parameter I can easily move the marks down the viz.

Hide the Random + Adjustor field and remove all gridlines, zero lines, axis and row/column dividers. On the Circle marks card, add Milestone Wrapped to Label and align to the bottom. Remove all the tooltips for now.

It’s at this point where you may need to start fiddling with how the labels get wrapped, and what the value of the Random field should be for a particular entry. So this can all be a bit trial and error.

From both y-axis, remove the axis titles. We need the years on the top axis to show, and can’t hide the bottom axis without removing the top one too. Instead, edit the bottom axis and set tick marks to None

On the top axis, we also only want to show years every 5 years, so edit the axis, and set the tick marks to be fixed to start on 01 Jan 2012 and increment every 5 years.

Adjust the height of the axis to be as narrow as possible while displaying the years. Name the sheet milestones.

Putting the vizzes together

On the dashboard, add the Milestones sheet. Make sure it fits the entire view, the title is removed, and any left/right, top/bottom padding is applied to match the rest of your dashboard. In my case I set the top & bottom outer padding to 0 and the left & right padding to 10.

Now click the Floating button and then add the Jobs sheet onto the viz. Remove the title, set the view to fit entire view and manually set the width of the viz to be width of dashboard – (left padding + right padding of milestones viz). In my case the dashboard width is 900, and the padding totalled 20, so I set the width to 880. Set the x position to be the same as the left padding (in my case 10). Find the shape legend tile that has been added and remove if from the dashboard.

Ok it’s getting there, but still a bit to be done. One of the things you may notice is the timeline scales aren’t lining up. between the two vizzes, and one is scaling much more into the future than the other.

We ultimately don’t want to show any axis for the Jobs viz, but we do want to make sure it tallies closely with the Milestones one. I found the easiest way to do this was to ensure all the axis were set to be exactly the same, and had a fixed start & end date. Again this is something I can adjust as and when additional data gets added into the viz.

So first, go to the Milestones viz and fix the top axis to start 01 Oct 2011 and end on 01 March 2023.

Then, go to the Jobs sheet and

  • Remove the title from the bottom axis
  • Set the axis tick marks to None
  • Remove the title from the top axis
  • Fix the axis to start 01 Oct 2011 and end on 01 March 2023
  • Set the axis tick marks to start on 01 Jan 2012 and increment every 5 years

Looking back at the dashboard, we can see things are much more closely aligned. It’s still not perfect, but to be honest I’m not sure where the mis-alignment is now coming from. For the purposes of my viz, this is ‘good enough’.

We can now hide both the axis on the Jobs sheet. We also want to set the background on the worksheet from white to None, which makes this viz transparent.

Back on the dashboard, you should now see the Milestone viz showing through the Jobs viz. Make further adjustments to the Jobs object – reduce the height a bit, shift it up a bit (use the y position on the layout tab to help if need be).

Once you’re happy with the positioning of the objects, and the size of all the marks, then we want to hide the vertical ‘threads’ from the milestone chart that are appearing above the horizontal gantt bars on the job timeline.

I simply use carefully placed floating blank objects to do this. Again, another example of a technique I wouldn’t typically use if I was building a business dashboard. Place the blank objects, set the background to white, then change the floating order and ‘send backwards’ so they are behind the Jobs viz but in front of the Milestones viz.

Finally, I wanted to show that my time at RM extended before 2012, so I added a floating text box just containing … onto the viz.

And that’s it. With the exception of a couple of custom shapes which needed to be built in another tool (I tend to use drawing shapes in Powerpoint), the viz has all been built in Tableau, and there’s nothing overly complex in getting the desired display. I’m using several instances of ‘hard coding’ (fixing the axis, manually positioning labels, using floating blanks to hide stuff), that I wouldn’t advocate if I was building a business dashboard where the data could update without the viz being edited too. But for the purposes of a mainly ‘static’ viz, I see no need to complicate things.

Feel free to have a go yourself using your own data, but please remember to give me credit if you share and publish.

Happy vizzin’!

Donna

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s