Visual Analysis of Indonesia’s Music Taste using API Spotify and Seaborn
Analyze: The Artist

Data loaded:

sql = "SELECT name,followers,genre,one_genre,popularity,url FROM artists ORDER BY name ASC" df = pd.read_sql(sql,my_conn,parse_dates=True)

Fig 6: I focus on “followers” and “genre” field

I connected artist with number of followers.

Fig 7 there was no local artist

This is the local artist (in range million)/

Fig 8

Every artist brings their own genre. Luckily, Spotify has mapped genre on every artist (Fig 6). This chart genre vs follower.

Fig 9

It seems “dance pop”, “pop”, “k-pop” is the most wanted genre in Indonesia. Now, let us see genre in domestic/local music.

Fig 10

Finally, I found genre “dangdut” with 1.35 million followers compare to “indonesian pop” with 22.26 million followers. Now, it is starting to clear about Indonesia’s music taste.

Analyze: The Song

Spotify gave audio feature to all song as meta-data. This is the description:

Fig 11

The values of all the feature are lies in range 0–1 except “loudness” and “tempo”. I have extracted each song using Spotipy.

from sqlalchemy import create_engine sql = "SELECT track_id,uri,danceability,energy,loudness,mode,speechiness,acousticness,instrumentalness,liveness,valence,tempo FROM audio_features af ORDER BY id" df_track = pd.read_sql(sql,my_conn,parse_dates=True)

Fig 12

Then I plot all values to see the correlation.

import seaborn as sns sns.pairplot(df_track)

Fig 13

Please, forgive me about the image. You could save the image on your local computer and zoom in to see more detail. I noticed several things:

“energy” and “valence” are in linear relation.

“mode” could be dropped for this analyze.

“danceability” ,“energy”, “loudness” have positive correlation.

“acousticness” and “energy” have negative correlation and that is make sense.

To get more insight, I took top 100 song based on number of stream like I did in Fig 2 then I calculated average items in audio feature. Lastly, I calculated average items in audio feature for all songs. I plotted on radar chart.

Fig 14

There were almost no difference score between top 100 song and all song. Both had score 0.55 ~ 0.6. This was inline with Fig 9, Indonesia’s Spotify users tend to listen to song with positive ambience (“valence” score ~ 0.6) and dance intend (“danceability” score ~ 0.6). Also, with high energy.

Tips for composers and song producers, please make a song with “danceability”, “valence”, and “energy” score above 0.5 because this is what Indonesia wants!

Conclusion

After analyze the dataset, I concluded several things:
['Krisna Renaldi']
['Music', 'Seaborn', 'Python', 'Spotify']