Data Viz Done Right

June 10, 2016

My First Alteryx App: Pinterest Board Downloader

No comments

Alteryx Inspire was an amazing conference! And the name is absolutely spot on…you will be so inspired to do amazing things with Alteryx. While there, I decided to challenge myself and learn how to build an Alteryx app. My app, named Pinterest Board Downloader, allows you to download all of the information about any public Pinterest board. In this post, I’m going to detail how I built it, what I learned, and who helped me along the way.

A bit of background on where the app came from. I had been using IFTTT to log all of the pins I make to the Makeover Monday Pinterest board, but the main problem was that I didn’t have data for the first few weeks. Pinterest has an API that you can call to download all of the pins and Paul Houghton was teaching data parsing, data prep, JSON parsing, and macros in the first week of Alteryx training for cohort 3 of The Data School. I saw this as a great way for me to learn these skills too and also fix my data issues with Makeover Monday.

However, for the app, I wanted to make it more generic so that it would work for ANY Pinterest board. Let’s start with the guts of the workflow.

Essentially this is what the macro does:

  1. Take the input from the app (the URL of the Pinterest board) and call the Pinterest API
  2. Parse the JSON
  3. Clean up the JSON to make it wide rather than tall
  4. Interate through all pages of the Inboard (the API only returns a subset of the records with each call)

The parsing and cleaning bits were pretty straight forward and so was calling the API. What tripped me up was how to cycle through the pages in the Pinboard to get all records. That’s where Robin Kennedy showed me how to make it an interative macro. Make sure you choose the Iterative Macro option on the Workflow tab of the Configuration window.

I couldn’t quite get it to work though and the Data School presentations were looming. So I called Chris Love and he showed me how to make the macro page through the iterations. It’s like magic watching Chris use Alteryx.

Conceptually I understand what an interative macro is and what it does, but I still don’t have my head wrapped around WHY it works the way it does. I admit that I don’t quite “flow” with Alteryx yet like I do with Tableau.

Ok, so now I’m getting all of the records. The next step is to turn it into an app. I had never done this before, but it was fairly straight forward. The trick is to go to the Workflow tab on the Configuration window and choose the Analytic App option.

The app workflow is also pretty straight forward.

Andy Pick helped me get started with the interface design part. All it does is provide a text box for the user to enter the Pinterest board URL. From there, I update the API string to use my API key, but to get the data for the Pinboard entered. The app then calls the interative macro above and the Action tool asks the user where to save it and in what format. I didn’t want to only allow a CSV or TDE, so the user can save it in any Alteryx supported format.

After I got this bit working, the macro broke. This led me to the Community room that was set up at Inspire and there waiting for me was the great Chris Love. It turned out I wasn’t passing the string properly from my app into the macro. Once that was fixed, it worked perfectly.

And that’s it! I feel like I learn a massive amount at Inspire this week. The Community is amazing, enthusiastic and absolutely brilliant. The most important lesson I’d like to pass on is that in order to learn, you need to get stuck in. Find a real problem you’re trying to solve and see it through. Ask for help when you get stuck.

Give my Pinterest Board Downloader app a whirl! Send me any feedback if it isn’t working quite right.

No comments

Post a Comment