I wanted to look for more than just key changes because, let's be honest, even though the above graph is kind of interesting, it doesn't have a lot of practical meaning if you're not a professional musician. I also decided to look at average values of a few different features over time.
The first graph shows energy, danceability and valence. From Spotify:
Energy is a measure from 0 to 1 and represents a measure of intensity and activity. High energy tracks feel loud and noisy, low energy tracks are the opposite.
Danceability measures how suitable a song is for dancing based on several different measures. 1 means high danceability, 0 means no danceability.
Valence describes musical cheerfulness of a song measured between 0 and 1. High valence means the song feels really positive and happy.
As you can see, valence has been steadily decreasing since 2000 which I guess means that popular music is getting steadily more depressing and angry over time? Perhaps we can blame Adele's Hello and most Billie Eilish songs for that. Oddly enough danceability and energy seem to move in opposite directions which would indicate that danceability isn't heavily tied to energy. As an economist, I was kinda hoping to see some movement around recessionary periods, eg. after 2008 in the peak of the recession, I thought popular music might have gotten more depressing, or valence might have initially decreased and then increases as the economy recovers. That doesn't appear to be happening but I think it's an interesting point for future research.