Mapping Spotify pitch classes to Hz: My first RMarkdown project (tidyverse)

Hi everyone,

After coming from a non-tech background (law and PR), I've spent the past few months teaching myself R and data analysis. I just finished my first end-to-end project and wanted to share it with the community!

The project is called coldplay-in-hz.

The idea: Spotify’s Web API reports track keys as categorical integers (0 to 11). I wanted to treat them as actual physical frequencies instead. Using tidyverse and rmarkdown, I mapped each track's pitch class to its fundamental frequency in Hz (f=440×2n/12) across Coldplay's studio discography (2000–2021).

A few findings:

  • Heavy clustering around E4 (~329.6 Hz) and A4 (440 Hz) as key fundamentals.
  • Average fundamental frequency remains surprisingly consistent across two decades.
  • Minor keys strongly correlate with lower acoustic valence.

GitHub Repo: GitHub - frequencymatch/coldplay-in-hz: The hidden frequencies of Coldplay · GitHub

As someone still fairly new to R, I would love any feedback on:

  • Code efficiency or idiomatic tidyverse practices.
  • Rmd structure and documentation habits.

Thanks for taking a look!