Tableau: Design your Tableau Portfolio

Priyanka Dobhal
Analytics Vidhya
Published in
5 min readMay 15, 2021

I recently witnessed some amazing work from the #datafam community on Portfolio Day. That’s when I got an idea to build this in Tableau.

I have been working on a code to get the tableau public details along with the images, but my work was halfway done when I came across Ken Flerage’s blog on Tableau public services :) Do check out his blog to know how he pulls the data.
https://www.flerlagetwins.com/2021/03/stats-service.html

So the next step is to get the images of the viz. This blog would cover how you can download the images for your viz and create a portfolio of your vizes in Tableau. You can share this with your folks and prospective employers to showcase your work together.

I have used python to access the Tableau Public API to get the Images of vizes. If you’re not comfortable with python, you can directly access the python code and follow the steps to download the file with minimal python understanding.

Python Code

You can skip this section if you want to just download the images. But If you have an understanding of python, I would encourage you to go through this. You may get some new ideas of your own.

The first step is to import the required libraries. The good thing about Google Colab is that you have most of them already installed.

So the plan is to use the tableau public API to get the detail. Sample URL —

https://public.tableau.com/profile/api/{profile}/workbooks?count={count}&index={index}

Download Images

So the code requires two inputs from the user side — (1) Username; (2) Number of Vizes

You can get the Username from the URL

And the number of vizes would be shown on your Tableau Public Profile.

I have used Google Colab to write up my code since it is easy to use and share. Also, most of the libraries are pre-installed so saves us a lot of extra work.

If you’re new to it, here’s a video that would help you get started —

You can copy the code and run it for yourself.

To run the code →
1. Go to Runtime under the menu → Run all
2. Scroll down till you see this which would show you a prompt to enter your username and then the number of vizes.

3. It will take a few minutes (2- 5mins) depending on the number of vizes you have. Download the highlighted files.

Voila! That’s all you need to get the images.

Using Images in Tableau

Now moving to the last part of this activity — using the images in Tableau.

You get 3 zip files — MyFullImages.zip, MyCircleCropImages.zip, and MyThumbImages.zip

Extract the images and place them in separate folders under My Tableau Repository\Shapes
For my convenience (and bad memory problem :D), I named them in this manner.

Good so far?

Let’s go on to Tableau. If you’re using the service by Ken Flerage, you’re almost there :) If not, I would ask you to give that a shot. The public stats get updated on a daily basis, so it will save you a lot of trouble.

Stats come from the google sheet and Tableau Public Viz Order is created through the python code. It is used in numbering the viz so that you can create a scroll view.

You can use my workbook as a sample to build yours. All you need to do is create your connection and then replace the existing (my data source) connection with yours.

But what about the images? Well, once you have your data, let’s assign the shapes. I have already created 3 calculated fields (which are a copy of Viz ID from google sheet) which will be used for shapes.

You can just assign the shapes by folder -
1. Assigning Full Image to Viz ID (Full Image)

2. Assigning Thumbnail to Viz ID (Thumbnail)

2. Assigning Circle-shaped images to Viz ID (Circle)

Make sure that you don’t have any filters since it would affect the order of images.

Perfect! Now if you go back to the dashboard, the images and data would be proper.

I haven’t used the circular (eclipse?) shape in my version. But take a shot at how you want to explore your data. Push your creativity and make this your own :)

I keep promising myself to keep it short but here we are again with a long one :D

But I hope you enjoyed this and hoping to see some portfolio from the #DataFam :)

If you need any help in navigating through the process, feel free to connect with me on Twitter and I’ll be happy to help out.

You can find my workbooks on my Tableau Public page —

My Portfolio (Long Form)

My Portfolio (Compact version)

Lastly, would like to thank Ken Flerage and Will Sutton for their detailed blog on the Tableau Public API.

Thanks for your time :)

--

--