With the Spotify API in R, you can get datasets like this, identifying: album name, key and mode of the key:
data <- tibble::tribble(~track_name,~key_name,~mode_name,
"willow","G","major",
"champagne problems","C","major",
"gold rush","A","major",
"‘tis the damn season","F","major",
"tolerate it","A","major",
"no body, no crime (feat. HAIM)","G","minor",
"happiness","B","major",
"dorothea","E","major",
"coney island (feat. The National)","G#","major",
"ivy","D","major",
"cowboy like me","C","major",
"long story short","C","major",
"marjorie","F","major",
"closure","A","major",
"evermore (feat. Bon Iver)","C#","major")
And I want to reproduce graphs similar to these found in the book "Visualizing the Beatles":
Each point should be the track_name, coloured by the mode_name, but I don't know how to get into polar coords with the key_names and the position of tracks' name.