Skip to content
The best hip-hop songs of all time, visualized
JavaScript R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

The best hip-hop songs of all time, visualized

A tiny data analysis project on hip-hop & gender, based on data from BBC Music. See my post on the Datawrapper blog for more info: The best hip-hop songs of all time, visualized.

This is a educational project and not affiliated with BBC Music.

[Interactive chart]


BBC Music polled over 1001 critics in 15 countries to find the best hip-hop song ever. This repo contains poll data, originally published by BBC Music, as well as code for transforming the data, adding cover artwork, and publishing charts via Datawrapper. The poll data was extracted from this article on The greatest hip-hop songs of all time - who voted


Ranking the poll submissions (using R)

The ranking algorithm, as described in the BBC Music article:

We awarded 10 points for first ranked track, eight points for second ranked track, and so on down to two points for fifth place. The song with the most points won. We split ties by the total number of votes: songs with more votes ranked higher. Any ties remaining after this were split by first place votes, followed by second place votes and so on: songs with more critics placing them at higher up the lists up ranked higher.

Use run_analysis.R to run this algothm using R.

Publish charts to Datawrapper (using R)

See create_datawrapper_chart.R for a simple script that creates a scatterplot using Datawrapper. This script uses the experimental DatawRappr R package, which needs to be installed via Devtools (devtools::install_github("munichrocker/DatawRappr")). You'll need a Datawrapper API key, which you can obtain from and then set in an .Renviron file. See .Renviron.sample for an example.

Get album covers from the Spotify API (using NodeJS)

npm install
node load_spotify_data.js --token='YOUR-OAUTH-TOKEN'  

For using the Spotify API, you need to generate an oAuth token on Docs and a simple way to generate a token can be found here:


1 The list published by BBC Music has 107 entries. However, other articles about the best of list give the number of critics polled as 106 and 108.

You can’t perform that action at this time.