Musical Features and Chart Success: Insights from the Most Streamed Spotify Songs in 2023
Project Overview
We looked at a data set called “Most Streamed Spotify Songs 2023”, which can be found on Kaggle.
Each row in this data set corresponded to an individual song that was considered to be one of the most streamed songs on Spotify in 2023, as reported by Spotify. The dataframe consisted of the following variables:
- title_name: Name of the song
- artist.s._name: Name of the artist(s) of the song
- artist_count: Number of artists contributing to the song
- released_year: Year when the song was released
- released_month: Month when the song was released
- released_day: Day of the month when the song was released
- in_spotify_playlists: Number of Spotify playlists the song is included in
- in_spotify_charts: Presence and rank of the song on Spotify charts
- streams: Total number of streams on Spotify
- in_apple_playlists: Number of Apple Music playlists the song is included in
- in_apple_charts: Presence and rank of the song on Apple Music charts
- in_deezer_playlists: Number of Deezer playlists the song is included in
- in_deezer_charts: Presence and rank of the song on Deezer charts
- in_shazam_charts: Presence and rank of the song on Shazam charts
- bpm: Beats per minute, a measure of song tempo
- key: Key of the song
- mode: Mode of the song (major or minor)
- danceability_.: Percentage indicating how suitable the song is for dancing
- valence_.: Positivity of the song’s musical content
- energy_.: Perceived energy level of the song
- acousticness_.: Amount of acoustic sound in the song
- instrumentalness_.: Amount of instrumental content in the song
- liveness_.: Presence of live performance elements
- speechiness_.: Amount of spoken words in the song
Overall, we can see that in addition to variables that help identify distinct songs, we have some variables that are more concerned with how well a song performed across four different streaming platforms (Spotify, Apple Music, Deezer, and Shazam), as well as some variables that are more concerned about the auditory features and content of the song.
With these variables in mind, we studied the given data with the intent of answering the following research questions:
- How do music attributes (like danceability, energy, valence, etc.) change depending on the time of year the song is released?
- How does key and mode affect a given song’s auditory features?
- How does a song’s popularity relate to its chart success across different platforms?
Musical Attributes Over Time
With respect to the first research question about how music attributes change depending on when in the year the song is released, we first look at the the average values for these variables for each month of the year, depending on the release month of the song.
From the above graph, we can see that the average of most of these variables stayed relatively consistent regardless of the release date. We can see this for variables danceability, energy, liveness, speechiness, and instrumentalness. On the other hand, we see more variability in valence and acousticness depending on the time of year the song is released.
To see this more clearly, we can look at the estimated density curves for acousticness across different release months.
From the above graph, we can see that while the curves for each month tends to share the same general shape with a mode centered around 0-25% acousticness and right skew, each curve is different from each other with fluctuations at different values. In particular, note that the height of the mode differs across all of the curves.
Thus, while most of the musical attributes didn’t vary across different release months, variables like valence and acousticness did.
Key and Mode vs. Auditory Features
The next research question we had is to explore how different technical aspects of songs correlate to energy levels and popularity of a song. We specially decided to explore how the energy attribute of a song is related to its dancebility score, with the intention of observing how the mode of the song affects both variables. Therefore, we created a graph to understand how the energy ranking, danceability ranking and mode of songs in 2023 were related to each other.
The graph above indicates that there is a small difference in the correlation between energy and danceability of songs across major and minor keys. We assumed that songs in a minor key would have overall lower danceability score due to the “sad” tone of songs in minor keys. Instead, we can see that regardless of key, the energy of the song is positively correlated with the danceability of the song. The major key songs showing a stronger positive correlation than songs in a minor key. Further exploration will include exploring the correlation between other quantitative variables in the dataset (acousticness, instrumentalism, etc.) with respect to song key and mode of songs. The second graph that we made to answer this question was a PCA biplot in order to observe how different quantitative attributes of popular songs are related to the general key of the song.
PC1 PC2 PC3 PC4 PC5
artist_count -0.28835212 0.2822949 0.13162294 -0.30831407 -0.01931288
bpm 0.05649951 -0.1569955 0.55117538 0.51109697 0.47129772
in_spotify_playlists 0.04902342 -0.3877520 -0.40861082 0.37754239 -0.20445663
danceability_. -0.46202876 0.3464036 -0.26774988 -0.00474927 0.04720794
valence_. -0.43601533 0.1012335 -0.07604887 0.28537783 -0.10217368
energy_. -0.50391151 -0.4255111 0.06548662 -0.06276620 0.09066178
acousticness_. 0.44384577 0.4111074 -0.01079898 0.13228181 -0.21815379
instrumentalness_. 0.17621650 -0.1292405 -0.13477715 -0.52720115 0.57624442
liveness_. -0.04819157 -0.1955868 0.58521692 -0.30216302 -0.54426456
speechiness_. -0.15289559 0.4583017 0.26343126 0.17040950 0.19733911
PC6 PC7 PC8 PC9
artist_count -0.25352202 -0.81006631 0.04062627 -0.001154369
bpm 0.13694777 -0.24124027 -0.02681426 0.313733628
in_spotify_playlists -0.40317144 -0.25906166 -0.49796775 0.129584702
danceability_. 0.10586424 0.18233493 -0.10424653 0.642738664
valence_. 0.57003976 -0.09573730 -0.31628949 -0.264088228
energy_. 0.02938785 0.02200671 0.03922461 -0.441961898
acousticness_. 0.31884902 -0.20624171 -0.24468677 -0.229862562
instrumentalness_. 0.17529750 -0.02233072 -0.53965259 0.005789492
liveness_. 0.05122252 0.13608112 -0.38764961 0.240823530
speechiness_. -0.53140457 0.33768986 -0.36857144 -0.309395366
PC10
artist_count -0.047695392
bpm 0.094471824
in_spotify_playlists 0.038952465
danceability_. 0.352362316
valence_. -0.445069009
energy_. 0.591902890
acousticness_. 0.558459234
instrumentalness_. -0.039934272
liveness_. 0.002848541
speechiness_. -0.034766319
We can see from PCA analysis that dimension one is heavily influenced by instrumentalism and acousticness while dimension two is influenced by speechiness, danceability, artist count, and valence. Overall, we can see that certain variables have a strong negative correlation like acousticness and energy due to the opposite arrows directions indicated in the biplot. We can also see that there is a strong correlation between speechiness, artist count, danceability and valence. Finally we can see that acousticness, instrumentalness, and bpm are weakly correlated. In terms of relationship between song attributes and general key, we can see there is little to no relationship between key and various attributes as shown by the wide spread of the data.
Popularity and Chart Ranking Across Different Platforms
For the last research question, we explored how a song’s popularity relates to its chart success across different platforms. To measure popularity in this dataset, we used the total number of streams the song has on Spotify; we performed a log transformation on this variable to avoid a model dominated with extreme streaming values in the billions. To measure the chart success, we normalized the chart rankings across Spotify, Apple Music, Deezer, and Shazam, assigning the value 1 to the top ranked songs, ranging down to 0 for songs that didn’t chart at all. We will also consider the year the song was released (grouped into decades) to better understand this relationship.
The above graph suggests that there is a generally negative relationship between the popularity of a song, or total number of Spotify streams, and its chart score, regardless of platform, songs with more streams tend to have worse chart rankings. On Apple Music and Shazam, this relationship is more strongly negative, with slopes in larger magnitudes, meaning songs with higher stream counts tend to chart even worse on these platforms. In the case of Shazam, a user would be more unlikely to look up more well-known songs. Additionally, newer songs (that have been released in the 2020s) are more clustered toward better chart scores and lower streams, which suggests a recency effect where newer music is favored on the charts, regardless of total streams. On Spotify and Deezer, this relationship is flatter and weaker.
Call:
lm(formula = score ~ log10(streams) + platform, data = plot_df)
Residuals:
Min 1Q Median 3Q Max
-0.96625 -0.02440 0.04830 0.09616 0.27255
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.574711 0.049054 32.102 < 2e-16 ***
log10(streams) -0.076751 0.005751 -13.346 < 2e-16 ***
platformApple -0.110504 0.008093 -13.654 < 2e-16 ***
platformDeezer 0.046211 0.008093 5.710 1.22e-08 ***
platformShazam -0.033987 0.008093 -4.199 2.74e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1766 on 3803 degrees of freedom
Multiple R-squared: 0.1319, Adjusted R-squared: 0.131
F-statistic: 144.4 on 4 and 3803 DF, p-value: < 2.2e-16
Call:
lm(formula = score ~ log10(streams) * platform, data = plot_df)
Residuals:
Min 1Q Median 3Q Max
-1.01004 -0.02430 0.04642 0.08881 0.29804
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.303219 0.097173 13.411 < 2e-16 ***
log10(streams) -0.044704 0.011451 -3.904 9.63e-05 ***
platformApple 0.360955 0.137423 2.627 0.008659 **
platformDeezer 0.013206 0.137423 0.096 0.923449
platformShazam 0.613529 0.137423 4.465 8.26e-06 ***
log10(streams):platformApple -0.055652 0.016194 -3.437 0.000595 ***
log10(streams):platformDeezer 0.003896 0.016194 0.241 0.809891
log10(streams):platformShazam -0.076433 0.016194 -4.720 2.44e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.1758 on 3800 degrees of freedom
Multiple R-squared: 0.1402, Adjusted R-squared: 0.1387
F-statistic: 88.55 on 7 and 3800 DF, p-value: < 2.2e-16
Analysis of Variance Table
Model 1: score ~ log10(streams) * platform
Model 2: score ~ log10(streams) + platform
Res.Df RSS Df Sum of Sq F Pr(>F)
1 3800 117.43
2 3803 118.57 -3 -1.1422 12.32 5.104e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The faceted scatterplot provides an initial understanding of the relationship between a song’s lifetime popularity and its chart success, across different platforms. To support this visual trend, we fit two linear regression models. The first model (shown above) includes the total streams, platform chart success, and their interaction to test whether this relationship actually differed by platform. The second model omitted the interaction variables to compare. Results show that the interaction between streams and platform chart rankings was statistically significant (p-value < 2.2e-16), which supports the conclusion that the relationship between streams and chart scores differs significantly across platforms. Through ANOVA comparison (p-value < 0.05), we confirm the relationship differs significantly across platforms, so we retained the interaction terms in the final model.
The above graph extends the analysis by showing an overall view of how songs cluster based on their stream counts and chart performance across all platforms. Each point represents a song, and the color represents the total number of Spotify streams. The plot suggests that the majority of songs with lower stream counts cluster tightly together, which indicates their similar behavior across streaming platforms. The songs with much higher stream counts (e.g., “Blinding Lights” by The Weeknd and “Shape of You” by Ed Sheeran) are more spread out and behave more differently, which suggests that these extremely popular hits deviate more in cross-platform success patterns. This trend is likely because different platforms use different metrics to calculate their chart rankings. Overall, while a song’s popularity does generally relate to worse chart success, the relationship is dependent on platform, with highly popular songs exhibiting much more unique behavior across platform.
Conclusion
Overall, we explored how musical attributes vary by release month, how key and mode relate to several song characteristics, and how song popularity relates to chart success across platforms. We found that most musical attributes are stable throughout the year, yet valence and acousticness vary seasonally. Energy and danceability are positively correlated regardless of key, and we found that there is little to no relationship between key and other song attributes. Lastly, we found that popularity is generally associated with worse chart rankings largely due to a recency bias, with platform-specific variations, especially for mega-hit songs.
There are several areas for potential future work on this topic. An investigation into how marketing factors, like social media trends, advertising, and an artist’s staying power, impact a song’s chart ranking would help to explain why some songs chart better than others despite similar popularity and stream counts. Additionally, further exploration into text or sentiment analysis of the lyrics of popular songs could provide insight into how emotional content could influence the various musical attributes, despite a similar key. Lastly, further research into how listening data varies by month and season, rather than release month, could lead to findings about how a song’s musical attributes can influence the timing of a song’s popularity, not just its release month.
However, we did not have access to other elements of each song, like external marketing data, lyrical content, or longitudinal listening data to explore these additional questions. More detailed and dynamic data would assist in addressing these questions. To conclude, our findings offer a foundation for understanding the musical, seasonal, and popularity-driven factors that shape the success of modern songs, while highlighting new areas for deeper exploration as more complex data and methods become available.