Analysing click counts from using Python and Tableau

I use for link shortening. I also do monthly round ups of who’s been blogging about Tableau (for example here are February, March, April). I want to know how many clicks each link receives. Well – there’s an API for that. And with Tableau v8, there’s a way of going from API to TDE very easily, I wanted to learn how to use Python and the API code and this was the project for me! Here’s the results of the analysis; click the image for the interactive version.


Bitly links analysed

How did I do this, and how can you do this for yourself?

Learn python

Fortunately I’ve been writing code of some sort for years, but I did need to learn python kind-of-properly for this. I’ve uploaded the code to github – feel free to improve it or change it

Learn the data engine API

This was a breeze. I used two references. Ryan Robitaille’s early exploration blog was useful and then Michael Kovner’s how-to video gave me the rest of knowledge I needed.

Analyse in Tableau

The results are in the Tableau viz above.


I’m grateful to Ryan, Michael and my friend Ben Foxall for help in this endeavour. It’s been really useful to learn the process of coding to get a TDE file.


Add Yours →

Andy, thaks for this. I tried executing your github code and I am receiving this error:

C:\>python c:\Bitly-to-TDE-master\
File “c:\Bitly-to-TDE-master\”, line 41
print ‘tde ok’
SyntaxError: invalid syntax


Leave a Reply