Detecting and Encouraging a Fan’s Affinity using Spotify’s Top Recent Streamed Tracks

How much Faith do you have in Hurts?

Image for post
Image for post

Get a User’s Top Tracks

Image for post
Image for post
The original wireframe
curl -X GET "https://api.spotify.com/v1/me/top/tracks?time_range=short_term&limit=50" -H "Authorization: Bearer {your access token}"

Algorithm

let total = (tracks.length * (tracks.length + 1)) / 2
let points = 0tracks.forEach((track, i) => {
if (track.artist == "Hurts") {
points += tracks.length - i
}
})
return Math.round(points / total * 100)

Leaderboard

Component Design and Development

Image for post
Image for post
The design system
Image for post
Image for post
App screens

Faith Loader

Faith Progress

Thanks

Image for post
Image for post

I develop websites for rock 'n' roll bands and get paid in sex and drugs. Previously Silva Artist Management, SoundCloud, and Songkick. Currently: Available

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store