Dungeons & Dragons (D&D) Spell Book API Project

Last week, I formally learned how to retrieve data through an API. This training was much needed, especially after my experience completing the Dashboard Week: Rick and Morty API challenge. It was fun to practice Regex in a realistic scenario and by the end of the day, I grew very familiar with not only the Regex tool, but also the Download and Parse JSON tools.

My new best friends:

Regex tool
Download tool
Parse JSON tool


After learning how to use APIs in Alteryx, I knew I wanted to complete an API project. A quick Google search led me to this list of free APIs. (Unfortunately, the Sakura CardCaptor API no longer works; I would love to do a Tableau dashboard of my favorite childhood TV show. 😭)

I first chose the D&D 5e API to collect data on spells. However, after downloading and preparing the data, I calculated a total of 319 spells, which feels suspiciously low.


Pagination may be needed, but the documentation online and the data itself did not include any page parameters or page numbers.

Fortunately, there is more than one D&D API. After downloading and JSON parsing data from Open5e, I was relieved to see some information about pages in the data. I don’t know how many pages there are in this data, but at least I know what the page parameter looks like.


I went back to my workflow and used the Generate Rows tool to help me generate page numbers to paginate through.


I configured the Payload of my Download tool to employ the new page column.


If I scroll down in the Results pane, I can see there are 17 pages of spells.


I obtained my 17 pages of D&D spells data and continued my Alteryx workflow to clean and reshape the data. Using the Summarize tool, I once again calculated the number of spells and arrived at a total of 835 spells - are there THAT many spells?


After examining the data and consulting with dungeon master friends, I decided to stick with the 319 spells from the Wizards of the Coast Systems Reference Document. In validating my data, I arrived at the same number as I did earlier in this process.


Now that I have my data, I can start to visualize the D&D spells. I imagined a spellbook that listed the spells in a text table and a sidebar of filters by class and spell level. I knew I would employ dynamic titles, a show/hide button, and dynamic zone visibility in this dashboard, so I was eager to get started in Tableau.


Without further ado, I present to you my D&D Spellbook dashboard:

Click image for the interactive dashboard.

I'm very glad I had the opportunity to sit in on DSNY3's API training and time to complete this personal project because this was thoroughly enjoyable!

Author:
Elaine Yuan
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab