Back to Blog
Drake spotify5/20/2023 ![]() ![]() ![]() We’ll first convert the song length from milliseconds to minutes. Let’s quickly clean a few variables in preparation for analysis. You can find the complete script to obtain this data here or download the dataset here. We’ll now loop over the tracks, applying the function, and save the dataset to a. Without going into how these measures are determined, we’ll use them to understand how Drake’s style has evolved over time. More importantly, Spotify’s API allows us to extract a number of “audio features” such as danceability, energy, instrumentalness, and tempo. With the list of track ids, we can now loop over each id and obtain track information such as track name, album, release date, length, and popularity. Instead, I used a playlist by ‘100 percent’ which claims to have, “all of Drake, all in one place.” This collection of 219 songs (15+ hours) contains “every appearance currently on Spotify updated with each new release.” Great! We’ll now write a function to retrieve the ids for each track of this playlist. We could have first obtained a list of the artist’s albums and then looped through each album track. There are a few potential ways to create a dataset of Drake’s catalog. In the code snippet below, replace the client id and client secret variables with your own. To obtain them, visit the Spotify Developer Dashboard here and create an application. To do so, we need a “client id” and “client secret”. Next, we need to authenticate and connect to the API. Let’s start by calling the necessary libraries. In this post, I use Spotipy, “a lightweight Python library for the Spotify Web API”. Click here if you’d rather skip the code and jump into the analysis. What better way to celebrate than by analyzing his catalog using Spotify’s API? I’ve broken the celebration into two parts, getting the data and analyzing the data. This weekend I saw Drake live in Brooklyn as part of the Aubrey & the Three Migos tour. ![]() Over the last decade, I’ve watched Drake transform into a global rap and pop superstar. I’ve been a Drake fan since 2009 when I first heard “Best I Ever Had” from So Far Gone.
0 Comments
Read More
Leave a Reply. |