Tableau Public API with Alteryx

Originally introduced to the Tableau Public API by Tableau Enthusiast, Rodrigo Calloni, I couldn’t wait to assemble a whole list of people so that I could start to compare stats and spot trends.  I’ve been assisted by numerous people in the community as I worked through the data, and a special thanks to Amar Donthala who helped me get started with this Alteryx workflow.

cerebro1


The format that Rodrigo passed along to access the API looked like this:

https://public.tableau.com/profile/api/josh.tapley/workbooks?count=300&index=0#[!opt!]{”type”:”json”}[/!opt!]

Profile Name: You can see where my profile is displayed, “josh.tapley”
Count: 300 is where I found that the API starts to cap out.  If you have more vizzes, you have call the API multiple times
Index: The starting count, so if you run it a second time for a count of 300, start at 301.

cerebro2

Because the output is JSON, you can download the results locally to connect to Tableau, or you will have to use some sort of ETL tool.  I also found that some of the JSON is nested in places.

If you call this other URL (which doesn’t contain an INDEX or COUNT), you will get a subset of a person’s vizzes, but it also gives you information on their location, company and web links.

https://public.tableau.com/profile/api/josh.tapley/#[!opt!]{”type”:”json”}[/!opt!]

In Alteryx, I am inputting a list of profiles, greatly expanded by Neil Lord.  On the top path, I pull 3 sets of 100 vizzes for each person and on the bottom path I pull their additional information.  The nested JSON is on the additional information for the components of the author’s location.

After some light scrubbing and data wrangling, I put all of the data back together.  I realize that this could be more efficient, but it is also my first Alteryx workflow.

For 14,000 names it takes a few hours to load the results into the Output file!

Find the entire workflow here.  Cerebro

zip

 

After you have explored the data, please contact me through Twitter and I’d be happy to discuss it.

One improvement that I would like to make is to have the workflow loop through the different links (e.g. Twitter, LinkedIn) provided to define the link source and to keep them all.  I think that I only retain the first listed link at this time.