DEV Community

Cover image for Finding my new favorite song on Spotify

Finding my new favorite song on Spotify

Eric Bonfadini on January 18, 2018

While I'm developing (or just while I'm commuting to work) I usually love to hear some rock music. I created some playlists on Spotify, but lately...
Collapse
 
roger profile image
Roger Stach • Edited

Will you post this code on GitHub? I would like to test it against my own playlist :)

Collapse
 
ericbonfadini profile image
Eric Bonfadini

Hi Roger, I uploaded on github a Jupyter notebook:
github.com/eric-bonfadini/python-n...

Collapse
 
ky1e_s profile image
Kyle Stephens • Edited

I didn't realise Spotify has such an awesomely detailed API - you've put it to great use here Eric!

Just as an aside for anyone that likes the idea of tracking their music listening habits without writing code, there's a really cool service called last.fm (it's not as detailed as Eric's above analysis however)

Collapse
 
ben profile image
Ben Halpern

The title of this post does not do justice to its awesomeness.

Collapse
 
ericbonfadini profile image
Eric Bonfadini

Thanx a lot Ben!
I even spent quite some time in finding a good title, but, after all, developers are not good in naming things! :-D

Collapse
 
alien_mafia07 profile image
Brendan Rodrigues

It's a very interesting concept. I make video tutorials for Packt Publishing. Would you be interested in discussing making a course?

Would be a great opportunity to showcase some of your awesome skills with Python.

Collapse
 
darksmile92 profile image
Robin Kretzschmar

Nice one! This is something I always had in mind but never got it done. I like the approach to use charts for visualization!
Also good that you linked the API documentations, makes it easier to implement the calls (saves some time on research).

Thanks for the post!

Collapse
 
lukaszkuczynski profile image
lukaszkuczynski

Super dooper nice! I like Pandas, too, and the ease it gives you for data analysis. If it comes to music I am also big fan of it so I will surely take a closer look to Spotify API.
BTW, why didn't you use pandas built-in charting capabilities? Was seaborn really needed here?

Collapse
 
ericbonfadini profile image
Eric Bonfadini

I usually like Pandas built-in capabilities for quick plots while I'm exploring data (therefore Seaborn wasn't strictly needed here).
Anyway I really love the APIs, configurations and plots offered by Seaborn, along with its simplicity and Pandas integration.

Collapse
 
edujtm profile image
edujtm

This is really awesome, dude.

Do you think it could be used to generate a playlist based on an analysis of multiple people to get a playlist with common interests between them?
It could help with some problems i've seen in parties.

Really liked this, i'm going to reread it later.

Collapse
 
mtbsickrider profile image
Enrique Jose Padilla

Awesome article :)

Im dipping my toes into data science for the first time since i took my intro class, but never could find a project that was interesting to do + scoped to my capabilities.

Ive created a programming music playlist and have set up the spotify api to get the track info.

Now the only part left is the data science analysis, so excited to tackle that today.

Playlist for anyone whos interested in Classical/Video Game music :
open.spotify.com/user/1250987938/p...

Hopefully the data is all in the same genre.

Collapse
 
jacoby profile image
Dave Jacoby

I knew Spotify has an API. I didn't know it could do "Tell me about the song", but considering the "Year in Music" stuff, I suppose I should.

I have Last.FM data going back almost a decade (I could've used the API, for which I have a key, but instead I used this web-based tool), and I could see adding "100 Most-Played Tracks in 2011" and the like, and tracking how often I played my favorites, but really, the "This is what a Fave Song looks like; give me more" is much more interesting.

I will have to dive into the APIs and your code.

Collapse
 
fspaniol profile image
Fernando Spaniol

But where is the fun in that? :)

Collapse
 
ragore09 profile image
Raul Gonzalez

dude, this post was awesome!
nice to know the detailed API Spotify has

Collapse
 
cyril profile image
Cyril Niobé

Awesome idea ! Looks fun :)

Collapse
 
bugsysailor profile image
Bugsy Sailor

This is absolutely wonderful Eric! Thanks for sharing.

Collapse
 
hrmny profile image
Leah

And how are you gonna get anything similar with a YouTube search?

Collapse
 
peter profile image
Peter Kim Frank

Awesome article.

@walker , I think you'll really enjoy reading this one.

Collapse
 
seph_joe_ profile image
seph

Really cool article man! Something I definitely want to dive into now

Collapse
 
killmax profile image
Maxime Bruguet

Really interesting work, thanks !

Collapse
 
ivanbernatovic profile image
Ivan Bernatović

Honestly Spotify's current "Recommended for you" algorithm doesn't really work for me so from my experience it's really not something reliable.

Collapse
 
chakzefir profile image
chakzefir

That's what and how personal playlist do.
Looks like it works the same way.

Collapse
 
maestromac profile image
Mac Siri

This is quite amazing. Awesome work!