Yesterday was the first day of dashboard week. We were tasked with getting data from domain.com’s public API.
The first task was to understand how the API worked and get it running on Alteryx, so we could then build our vizes in Tableau. As it turns out, there’s good documentation on domain.com’s API.
You have to create an account and a project, and you can add to that project all the requests available for free – which gives you up to 500 calls a day. You also have to pay versions with unlimited calls, if needed. An interesting feature is that you can check the current usage of your daily call limit, which helps if you’re trying to stay away from the paying version.
This API needs a refresh token and a Bearer, which you need to request via a POST request.
You can then use that to make the API calls and get the data you’re looking for. I believe this was the first time I used a POST request to get data from an API, as well as the first one I saw that needs both a URL and a body with the parameters for your search.
You can check my alteryx workflow below. The first two containers are about requesting the bearer to use in the API calls, and the second one is about getting the data itself.
Another quirk about this API (not sure if because I was using the free version) is that the results come in the form of pages, with a limit of 200 results per page, so you have to iterate over each page number to get all the results. However I narrowed down my search parameters to include only 5 neighbourhoods in Sydney (according to this website, the coolest ones), and I was only looking for rentals of apartments, houses or studios. Hence my dashboard title ‘Coolest neighbourhoods in Sydney’. I removed a lot of the fields resulting coming with my API results, keeping only the most important ones.
This is my viz below:
It allows you to tweak the parameters to your liking and then select your dream place. Starting with weekly rental price, go on to choose the number of bedrooms, bathrooms, car parking spaces, and then all the amenities.
One other thing worth mentioning about the amenities/features is that they came out as 19 different fields that I then transposed and cross-tabbed, concatenating them into one single field, separated by commas, for each property listing. However, to have that filter in Tableau, I had to tweak that a bit more and bring it in as a datasource of its own. Instead of a wide dataset with all the features in different fields, I brought it in as a tall dataset with the features stacked in a column. The next step was blending this secondary datasource with the primary one on Property ID, and I had my list of features available for the end user.