We are halfway through our dashboard week. Every day is a new challenge and today’s is getting data through APIs.
For those who are not familiar, APIs are ‘middlemen’ or ‘middle software’ that allows two applications to talk to each other. You ask for information from a particular site, like AirBNB listings, supermarket items, movies from Netflix or anything else you can imagine, and APIs are gonna deliver them to you. For a more detailed explanation, you can read my colleague’s Kevin’s post.
The data we had to retrieve was from Giant Bomb – a gaming site. We had the freedom to choose any topic we want, and as I am not at all a gamer (the last time I played a game was 20 years ago and it was Spyro the Dragon), I had to use google to get inspiration. I decided to go with Tetris.
Before anything, it’s important to read the documentation to ensure that when you ‘call’ an API, you request it correct and it brings results. My first step was to get a list of all the game codes associated with Tetris. Below is the workflow I used in Alteryx to get that data:
After having a list of all the Tetris games, I wanted to extract some additional data about them, like game release dates, platforms, characters etc. I had to use the id from the previous result, and send a new API request. The workflow was very similar to the previous one.
After looking at all the data, I realised that my release date fields were empty. In order to get the dates, I used the release ID from step 2 and sent a new query using a new URL.
After getting and cleaning the data, I outputted it to Tableau and created the viz.
As 8 Data Schoolers were running queries all at the same from the same IP address, we got blocked from the site and couldn’t run queries before all of us could get data. But, luckily our colleague Alex had a VPN so he could run the queries for us, using workflows that we had prepared. Thanks, Alex!
I understand that this article is a bit technical, but if you have any questions, please feel free to reach out on social.