Generate a Spotify playlist from a csv with columns of track names and artist names. Designed specifically to explore and contextualize the McGill Billboard Corpus.
- Spotify Playlist of 691 songs from the McGill Corpus.
- data/mcgill-bb-playlist.html some basic playlist analysis from Spotify metadata.
- data/mcgill-bb-playlist-metadata.pickle. Pickled Python
dict
object of Spotify metadata for each track in playlist.
To view playlist analysis overview:
- Clone this repo, or...
- Save this linked page as an .html file, then open in-browser for plots and summaries of artist genres, track popularity, dates, and "acoustic features", or...
- Download/open directly from Dropbox.
You can read in the pickle as a dict object in Python using:
from config.config import load_playlist_pickle
Contains relevant Spotify metadata like album, artist, genre, popularity, etc. for each track, as well as Spotify's "audio features" metadata.
N.B. The dates in the playlist analysis often don't match the original album date since the search function often returns remastered versions, re-releases, and compilations.
pandas
spotipy
pathlib
datetime
os
pickle
Set this up with your Spotify API credentials, your Spotify Username, etc. to be able to write playlist.
Check the pathing as necessary; set root directory variable. I'm still learning pathing, apologies.
- Reads in the
data/mcgill_billboard_index.csv
. - Queries the
spotipy
API to get the track and musician URIs. - Creates a playlist.
It will open a browser tab to ask you to log in to your Spotify account.
Top 40 songs as measured by Spotify popularity March 7, 2021.
track_name | first_artist | track_popularity | genre_count | artist_genres | |
---|---|---|---|---|---|
0 | Sweet Home Alabama | Lynyrd Skynyrd | 81 | 9 | [rock, country rock, southern rock, classic rock, blues rock, mellow gold, album rock, soft rock, hard rock] |
1 | Wake Me Up Before You Go-Go | Wham! | 79 | 4 | [new wave pop, dance rock, europop, new romantic] |
2 | With Or Without You - Remastered | U2 | 79 | 3 | [irish rock, permanent wave, rock] |
3 | September | Earth, Wind & Fire | 79 | 6 | [quiet storm, jazz funk, motown, soul, disco, funk] |
4 | Beat It | Michael Jackson | 78 | 3 | [r&b, soul, pop] |
5 | Come Together - Remastered 2009 | The Beatles | 78 | 6 | [rock, british invasion, beatlesque, classic rock, merseybeat, psychedelic rock] |
6 | Come and Get Your Love - Single Version | Redbone | 77 | 2 | [native american contemporary, native american] |
7 | Bad Moon Rising | Creedence Clearwater Revival | 77 | 7 | [rock, country rock, southern rock, classic rock, album rock, swamp rock, roots rock] |
8 | Mrs. Robinson - From "The Graduate" Soundtrack | Simon & Garfunkel | 75 | 6 | [rock, mellow gold, classic rock, folk rock, folk, melancholia] |
9 | The Joker | Steve Miller Band | 75 | 12 | [rock, country rock, psychedelic rock, folk rock, classic rock, blues rock, album rock, mellow gold, soft rock, hard rock, roots rock, heartland rock] |
10 | Lovely Day | Bill Withers | 75 | 4 | [quiet storm, funk, motown, soul] |
11 | You Can Call Me Al | Paul Simon | 75 | 9 | [rock, singer-songwriter, permanent wave, classic rock, folk rock, mellow gold, folk, soft rock, roots rock] |
12 | La Grange - 2005 Remaster | ZZ Top | 75 | 7 | [rock, country rock, classic rock, blues rock, album rock, metal, hard rock] |
13 | Easy | Commodores | 75 | 8 | [quiet storm, mellow gold, motown, soul, disco, adult standards, soft rock, funk] |
14 | What's Love Got to Do with It | Tina Turner | 75 | 4 | [new wave pop, europop, soft rock, disco] |
15 | (Sittin' On) the Dock of the Bay | Otis Redding | 74 | 7 | [soul blues, classic soul, memphis soul, southern soul, soul, adult standards, funk] |
16 | Maniac | Michael Sembello | 74 | 1 | [hi-nrg] |
17 | Maneater | Daryl Hall & John Oates | 74 | 6 | [rock, yacht rock, mellow gold, classic rock, album rock, soft rock] |
18 | Brandy (You're a Fine Girl) | Looking Glass | 73 | 2 | [soft rock, sunshine pop] |
19 | Riders on the Storm | The Doors | 73 | 5 | [rock, acid rock, classic rock, album rock, psychedelic rock] |
20 | Old Time Rock & Roll | Bob Seger | 73 | 11 | [detroit rock, rock, country rock, classic rock, blues rock, folk rock, album rock, mellow gold, soft rock, hard rock, heartland rock] |
21 | Every Little Thing She Does Is Magic | The Police | 73 | 9 | [art rock, dance rock, new wave, rock, mellow gold, classic rock, permanent wave, album rock, soft rock] |
22 | Cecilia | Simon & Garfunkel | 73 | 6 | [rock, mellow gold, classic rock, folk rock, folk, melancholia] |
23 | Happy Together | The Turtles | 73 | 5 | [bubblegum pop, classic rock, folk rock, brill building pop, psychedelic rock] |
24 | Karma Chameleon - Remastered | Culture Club | 73 | 9 | [dance rock, new wave, new wave pop, mellow gold, europop, disco, soft rock, synthpop, new romantic] |
25 | Baby Can I Hold You | Tracy Chapman | 73 | 5 | [pop rock, singer-songwriter, lilith, folk, women's music] |
26 | Red Red Wine | UB40 | 73 | 3 | [uk reggae, reggae fusion, reggae] |
27 | Space Oddity - 2015 Remaster | David Bowie | 72 | 7 | [art rock, dance rock, rock, glam rock, classic rock, permanent wave, album rock] |
28 | True - Single Edit | Spandau Ballet | 72 | 9 | [dance rock, sophisti-pop, new wave, new wave pop, mellow gold, europop, soft rock, synthpop, new romantic] |
29 | Rebel Yell | Billy Idol | 72 | 10 | [dance rock, new wave, rock, new wave pop, mellow gold, classic rock, album rock, soft rock, hard rock, new romantic] |
30 | Maggie May | Rod Stewart | 72 | 3 | [soft rock, mellow gold, adult standards] |
31 | Money | Pink Floyd | 72 | 7 | [art rock, progressive rock, rock, classic rock, album rock, symphonic rock, psychedelic rock] |
32 | Unchained Melody | The Righteous Brothers | 72 | 8 | [rock-and-roll, bubblegum pop, folk rock, mellow gold, motown, rockabilly, adult standards, brill building pop] |
33 | Annie's Song | John Denver | 71 | 6 | [classic country pop, folk rock, mellow gold, folk, soft rock, adult standards] |
34 | Wild Horses - 2009 Mix | The Rolling Stones | 71 | 3 | [british invasion, classic rock, rock] |
35 | Take A Chance On Me | ABBA | 71 | 2 | [europop, swedish pop] |
36 | Help! - Remastered 2009 | The Beatles | 71 | 6 | [rock, british invasion, beatlesque, classic rock, merseybeat, psychedelic rock] |
37 | If I Could Turn Back Time | Cher | 71 | 4 | [dance pop, new wave pop, pop, hollywood] |
38 | Rich Girl | Daryl Hall & John Oates | 71 | 6 | [rock, yacht rock, mellow gold, classic rock, album rock, soft rock] |
39 | Jessie's Girl | Rick Springfield | 71 | 10 | [dance rock, rock, pop rock, new wave pop, yacht rock, mellow gold, classic rock, album rock, soft rock, australian rock] |
40 | Goodbye Yellow Brick Road - Remastered 2014 | Elton John | 71 | 4 | [soft rock, mellow gold, glam rock, piano rock] |