Recently I’ve found an article on Wikipedia with ranking of best games since 1998. One might not agree with few choices but definitely whole thing made me drive down the memory lane.  Let’s face it, big part of us play or played video games sometime in their life. I, personally, spent countless hours playing Counter-Strike, Half-life or Resident Evil (the elevator scene with monster dropping on top!).

With all that, it’s a great opportunity to create a Viz on the data and show that even fun projects can be delivered in Tableau without problems.

post20161227_5

Custom Shapes

Idea here was not only to show ranking but also couple more details for guys who might missed the certain title. Custom Shape approach seemed to be obvious solution as they are both versatile and easy to use. Tableau provide functionality of Custom Shape which means that you can use virtually any shape to display over the mark.
I started with going through the list of games and downloaded images that represents the cover (for modern games) or arcade splash screen for older titles. Having them all in one place, simply move folder to \Documents\My Tableau Repository\Shapes. If you have trouble finding folder – this community post might be handful https://community.tableau.com/thread/189379
After dropping your custom folder, you will be able to select Custom Shape in the Shape mark selector and assign them to proper values.
post20161227
Problems start when there’s more than few items to be aligned. With thumbnail that size, it would be hard to match proper cover with correct game. To speed things up, let’s do it in more advanced way – by editing .twb file.

.twb hacking

Save the .twb file in tableau, navigate to it on drive and open it using preffered text editor. I use Sublime Text3 as it has comparable number of features to Notepad++ but runs also on Mac which is my second working environment.
After opening the file, you will notice that it’s just an advanced xml file with fancy extension. You will also notice that there’s a separate section which hold mark name with Certain Custom Shape, image in our case:
Note that mapping is located in 2 places:

<encoding attr='shape' field='[none:Game:nk]' type='shape'>
<map to='Custom_games/Doom.jpg'>
<bucket>&quot;Doom&quot;</bucket>
</map>
<map to='Custom_games/Ico_north_american_cover.jpg'>
<bucket>&quot;Ico&quot;</bucket>
</map>
...

<shape name='Custom_games/biohock.jpg'>
iVBORw0KGgoAAAANSUhEUgAAANMAAAEsCAYAAABZtIahAAAACXBIWXMAAA7EAAAOxAGVKw4b
AAAgAElEQVR4nOy9eZBlR3no+fsy85y7VFVXdXWru6XuVqu1AlrRwmYLgQSSbIbFNs9WYGDw
gncQeIPHTNg47Ik3OLDnYeNnm/EymnjgwdjG9rONMYslgQTiSUJm09pqqSW1pN5ru8s5mfnN
H3nOvefeqm6B5028eBE+Ed1VdW+ezC+//PbvO9+R/c+sqKKAIiIoERBUQYTRTxQApPGhqiJM
XgqTn4mMPp/8VhGdvI/q2+bv9f3oCIBq/fG4xugpSMa/ikx/D6q67rPRmhVWmjDJBELGc4x

Only the first part needs to be changed. Second one is being generated automatically – it’s a binary representation of the image you provide. Having clear file naming and matching with mark it’s pretty easy to generate proper syntax that you just paste into .twb file.

post20161227_2

Save and reopen file in Tableau (just don’t save file in Tableau as it will override changes you’ve dona manually). Right now you should have covers assignes properly. Make sure to mark field holding shapes with default properties to shape.

post20161227_3It will help you to keep shapes consistent while publishing and copying data.

Video Embedding

Second cool feature used in this dashboard is Youtube video embedding. I’ve used YouTube as it is an ultimate source of gameplay videos for all of the games – even older ones. However, every video sharing provider can be used as long as embedding capabilities are available.

To achieve desired result I’ve copied YouTube links and added them to datasource as separate Dimension. This way I could point my Action to update Web Page Container on Dashboard.

post20161227_4

Note that this is URL Action which is not very common. My embed URL Calculated field :

"https://www.youtube.com/embed/" + [ embed code]

however if you have whole embed link in datasource then you can use Measure directly.