Shipping containers: How and why

A few hours ago, Andy Kriebel posted his latest #MakeoverMonday dataset, information about the largest shipping companies in the world. I expect this was off the back of the bankruptcy of Hanjin, a situation that leaves over 500,000 containers stranded at sea.

I was in need of cheering up. Big time. And so I reached to Tableau a couple of hours ago to see what could be done. My mood was one seeking fun over integrity, and the result clearly showed this.

My first thought was to create some form of bar chart where the bars were containers. After a brief foray into this visualisation, it was clear that this would look rubbish.

I clicked on the dropdown in the Marks card to see what else might be of use. I saw the “Square” option, and got to work.

You see, shipping containers are rectangular in shape. (Technically, the Square mark should be called Rectangle. But that’s another post.) I imagined my visualisation instantly, and got on with creating it.

You can find the visualisation at the bottom of this post. Or else, click here.

There are three images in the background, which in hindsight could have been combined into a single image. (My image manipulation skills are woefully lacking, as evidenced by the use of PowerPoint as my image-editing-tool of choice.)

There is a PNG of the boat. There’s another PNG of the background (sea and sky). And at the top is a single-colour bar to go behind the parameters. This ensures that the shading of the parameters doesn’t look odd atop a vari-shade background.

Each of these is floating, which is quite apt given the subject matter. The boat is literally floating atop the water, in both senses.

And the visualisation itself is as simple as they get. A “Squares” chart, the size of each square driven by the quantity being displayed. A parameter allows the user to select what to chart; a calculated field uses this parameter to drive its own value:

CASE [Chart by]
WHEN “Cargo capacity (total TEU)” then [Total TEU]
WHEN “Cargo capacity (chartered TEU)” then [Chartered TEU]
WHEN “Cargo capacity (owned TEU)” then [Owned TEU]
WHEN “Ships (total)” then [Total Ships]
WHEN “Ships (chartered)” then [Chartered Ships]
WHEN “Ships (owned)” then [Owned Ships]
END

A second parameter allows the user to select how many companies to display, and this drives a “Top X” filter on the Company field.

Like the images, the worksheet floats, and it sits in front of all the rest to ensure that it hides the background. Placing it just above the ship gives the impression of shipping containers. Possibly.

I had a lot of fun with this one. The ability to select the Top X companies makes the visualisation statistically woeful. (The area chart should be a percentage of the total, not of some arbitrary subset.) I knew this, but this was kindly reinforced by Andy Cotgreave 😉

The Tableau community cheered me up no end this evening, something I so dearly needed. Nineteen likes on Twitter gave me a much needed boost. Thank you all! Hope you like it.

Leave a Reply

Your email address will not be published. Required fields are marked *