Jan 202015
 

Yeah yeah, I know everyone usually does their AOTY writeups in November/December, but I always end up dragging my feet. I don’t even think I even came up with final lists for 2013 (or even 2012 for that matter), but I finally ended up getting it together for 2014, and without further ado, here’s my tops, with a few words about each pick…

Favorites:

http://blog.samsandberg.com/wp-content/uploads/2015/01/AOTY-2015-1to5.jpg

Maybe one of the most depressing records of all time (someone literally dies in every song), and yet really powerful storytelling with vivid imagery.

The album I likely spent the most time with this year. Just a great rock record through and through.

Another one I spent a ton of time with this year. Something about this one really hooks me.

Killer record, and finally a breakthrough for these guys! Plus that Letterman performance, you kidding me?!

She’s great. After digging into this one I even listened to her previous one a bunch. Plus somehow “Forgiven/Forgotten” became my airplane takeoff song (somehow that’s a thing, I guess?).

http://blog.samsandberg.com/wp-content/uploads/2015/01/AOTY-2015-5to10.jpg

Maybe the fullest record she’s done yet, my favorite songs she’s made are some of the best songs of the year, for sure.

My darlings of CMJ, probably the funnest record for me this year. And funnest shows. Do these guys know how to party or what?!

A nice nostalgia record, lots of heavy play time on the early side of 2014. The last song on Days left me off at the end of summer (in 2011) and Atlas picks up after a loooong winter to try and reintroduce spring.

I remember the first time I heard “Coffee”, I was listening to Sirius XMU and returning a rental car in Hoboken – blew me away. The rest of the album absolutely holds up as well.

Solid record full of great songs. Absolutely rocked Bowery Ballroom with an emotional performance when we saw them at the Hifi team outing in early December. And of course I was sure to get a big sweaty hug from Timothy Showalter after the show.

Honorable Mention:

  • The Men – Tomorrow’s Hits
  • Caribou – Our Love
  • Wye Oak – Shriek
  • Parquet Courts – Content Nausea
  • Eagulls – Eagulls
  • Hospitality – Trouble
  • D’Angelo – Black Messiah
  • Spoon – They Want My Soul
  • St. Vincent – St. Vincent
  • Karen O – Crush Songs
  • S. Carey – Range of Light
  • Julian Casablancas+The Voidz – Tyranny
  • Beck – Morning Phase

Top EPs:

  • Speedy Ortiz – Real Hair
  • Panda Bear – Mr Noah
Nov 202014
 

So you use Spotify and want a list of all of your playlists so you can come up with your #AOTY (album of the year). I’m sure there are other ways of doing this, but my rudimentary google searches produced no results, so here goes…

Requirements:

  • Spotify account
  • python
  • internets

First, sign up as a Spotify developer and create an application, here:

https://developer.spotify.com/my-applications/

Once you’ve created an application, make note of the Client ID and Client Secret, and add a new Redirect URIs to some working website.

Make sure to hit SAVE! If you don’t, this won’t work!!!

Now onto the code part…

First we need to put our Client ID Client Secret and Redirect URI into environment variables to be read later:

$ export SPOTIPY_CLIENT_ID='your-client-id-here'
$ export SPOTIPY_CLIENT_SECRET='your-client-secret-here'
$ export SPOTIPY_REDIRECT_URI='http://samsandberg.com'

Now we need an access token – here’s Spotify’s full formal auth guide:

https://developer.spotify.com/web-api/authorization-guide/

but for this exercise we’ll be using Spotipy (docs)

Install spotipy:

$ pip install spotipy

Next we need to determine our scope. Here’s a list of the available scopes:

https://developer.spotify.com/web-api/using-scopes/

For this exercise, we’ll be using playlist-read-private.

Now let’s use this to get our scope. My username is loisaidasam, so that’s the username you’ll see me use throughout this post:

>>> import spotipy.util as util
>>> util.prompt_for_user_token('loisaidasam', scope='user-library-read')

This should open a browser window and trigger you to authenticate against your newly made application. When you say yes, it’ll redirect you to your redirect uri, which you copy and paste back here:

Enter the URL you were redirected to: 

The next string it gives you is your token. Copy and paste that into a variable called token

Now, for getting your playlists…

Here’s the Spotify documentation describing how to read a user’s playlists:

https://developer.spotify.com/web-api/get-list-users-playlists/

but for this exercise we’ll be using Spotipy’s user_playlists() method:

We have to use limit/offset to get all of the results, so try this code:

>>> import spotipy
>>> s = spotipy.Spotify(token)
>>> offset = 0
>>> while True:
>>>     playlists = s.user_playlists('loisaidasam', offset=offset, limit=50)
>>>     if not playlists['items']:
>>>         break
>>>     for item in playlists['items']:
>>>         print item['name']
>>>     offset += len(playlists['items'])

Running this should print out all of your playlist names one by one.

Voila!