Welcome to Part III and the conclusion to our data wrangling and retrieving from the Disney API.

Previously in Part 1 and Part II

In Part I we created URLs with the page numbers and downloaded the data from each page. You can find a more in depth look in Part I.

In Part II, we isolated our headers in preparation to transpose them into proper headers. You can find Part II here.

Filtering and transposing

So we’ve got our header titles (which are still in the column). However, in the data, there are nulls in a particular column. They are found in JSON_Name4 column. Having the null here indicates the character does NOT appear in multiple films, tv shows, short films or park attractions. So we’ll filter it out.

 

The workflow diverges at this point so we will follow the data with the nulls in them. This data will be transposed and we get some of our headers! That’s one side done.

Data before transposing

After transposing

 

 

 

 

 

 

The other side

Let’s go back to the other side of the filter! At this point I noticed that there was another category in the data called “allies”. Let’s filter that out too.

Filtering for allies

Combining the data

Following our “allies” filter we can change header names and reorder using Select tool. And then we can Join  the transposed and “allies” filtered data.

 

Almost there! We now Union the leftover data on the L side (top) and also the J (middle) outputs to get our complete data!

We did it!

Now all that’s left is to just output it to a filetype of your choice and Dashboard away!

Have fun!

I hope you enjoyed this series.

If you would like to contact me, please feel free to connect with and message me over at LinkedIn.

Thank you for reading and have a great day!

Andrew Ho
Author: Andrew Ho

Andrew joins The Data School with more than 10 years of extensive customer service experience in hospitality and administration fields, even owning and operating his own coffee shop at one point. Having identified a newfound interest in Tableau, Andrew is now taking his skills into data analytics. Outside of work, Andrew enjoys spending his time pampering his dog and two cats. He enjoys and appreciates all kinds of food, so you can be rest assured that no food will go to waste.