GithubHelp home page GithubHelp logo

playlist-creation's Introduction

playlist-creation

Description

So you know that Spotify Wrapped playlist that you get every year? They mix ALL the genres and artists in one playlist of your top songs. Yeah I never listen to that because I don't want to hear a Gunna track and then Elevation Worship right after. There's a time for both and it's definitely not right after each other. So I made this to get my top tracks and split them up by genre or artist.

Steps

  1. Get the listening history
  2. Get the spotify ids for the tracks
  3. Get the genres for the tracks
  4. Create playlist

Get the listening history

Using lastfm I was able to track the songs that I listen to on Spotify as Spotify doesn't provide this:

python get_track_logs.py common/config.yaml

Get the spotify ids for the tracks

Using the Spotify API I was able to search for the corresponding song ids:

python spotify_ids.py common/config.yaml

Get the genres for the tracks

Using the Spotify API again I was able to search for the corresponding genre as well:

python genres.py common/config.yaml

Create playlist

Connected to the Spotify API again to create the playlist:

python make_playlist.py common/config.yaml

Example

Setting the config to create a playlist of the top 15 hip hop songs and making sure to filter out any of those christian or gospel hip hop songs haha:

alt text

After running python make_playlist.py common/config.yaml we can see this in spotify:

alt text

Coming Soon

Analysis of my listening history including but not restricted to:

  • What do you listen to most?
  • Is there a pattern for when you listen to certain types of music?
  • Distribution of recency of music I listen to (ie. How much of each time period to I listen to?)
  • Most skipped song?
  • NLP if I'm feeling ambitious
  • And more!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.