A repository containing code for an analytics project in Python to identify the most brutal song based on audio features and analysis of the lyrics. I have written a blogpost on Medium about it. That post gives a nice overview over the approach and the result. The jupyter notebooks stored here provide all the code and go a little deeper in explaining and analyzing certain aspects of the project.
In case you don't know what Cannibal Corpse is - shame on you! Follow this link, please.
The analysis was performed in Python. Audio related features were requested from the Spotify API (using the spotipy
library) and lyrics scraped from the genius website (using a mixed approach of API requests and web-scraping with the beautifulsoup4
library).
The analysis is broken up in two parts / jupyter notebooks:
- The first contains the requesting of audio features from the Spotify API and the calculation of a "Sonic Brutality Index" for each song. It also contains an appendix comparing Cannibal Corpse's 'brutality' to that of Cannabis Corpse (of interest for Death Metal nerds only).
- The second contains the scraping of the lyrics from genius.com and the calculation of a "Lyrical Brutality Index", and then of the final "Total Brutality Index" by combining sbi and lbi.
Each notebook has an Appendix with some extra analyis. If you are into Cannibal Corpse - have a look ;-).
This project requires Python 3.7 and the following Python libraries installed:
You will need to register for the Spotify and Genius APIs to work with your own credentials. I'll keep mine secret. And you will also need to have software installed to run and execute an Jupyter Notebook
environment.yml
and requirements.text
are provided.
- Evan Oppenheimer for inspiring me with his blogpost on finding the angriest Death Grip song (in R)
- Charlie Tompson for inspiring Evan in the first place with this blogpost on finding sad Radiohead songs (in R too)
- Saif Mohammad for publishing The NRC Valence, Arousal, and Dominance Lexicon
- Everybody contributing to the spotipy library
- Chris Hyland for this really helpful Blogpost on scraping song lyrics
- Spotify for providing a very well documented and complete Web API
- Genius for providing a nice Web API too
- All the nerds contributing to Genius
Project End Date: Feb 2020