Exploring Raï music with Spotify API

Playing with Spotify API to explore Rai music. Who are the most popular Rai artists today? And what makes Rai so likeable?

Tinhinane
5 min readJan 23, 2021
Photo by Nabil Bachir Bouiadjra on Unsplash

Back in the 80s, Raï took the streets of the Oranie region (Algeria) to become one of the most popular and mainstream genres across North Africa today. Since then, the reception of Raï has evolved alongside the Algerian culture. Who would have thought that Hasni would appeal to the posh kids of Algiers?

I was fascinated by the rise and growth of Raï. From the 50s/60s rural Gasba and Guellal singers like Chaikha Rimitti, to the 80s/90s, more youth-oriented and energetic Cheba and Cheb singers. Raï spread quickly from North Africa to the immigrants in Europe and on to a Western audience.

I’m hoping, by making use of Spotify API, to gather insights as to who are the most popular Raï artists today? Are they all from Algeria? And what makes Raï music still so appealing?

Who are the most popular Raï artists?

Before we jump to the answer, let’s take a second to introduce the popularity measure in Spotify. The popularity of an artist is a value between 0 and 100, with 100 being the most popular. The artist’s popularity is calculated from the popularity of all the artist’s tracks.

Of course, ideally, I should take into account other factors. I could have included the number of followers of each artist. Some artists have lots of followers, but relatively low popularity, and that’s because they are no more active in the music industry or passed away.

Search all Raï artists by genre

To find the ‘hottest’ Raï artists, I simply extracted all artists’ whose genre assigned is Raï, sorted the result by popularity, and visualized the top 10 in a tree-map. Unsurprisingly, Khaled is the most popular one, with a popularity index of 63.

Raï is clearly no more a niche genre from the Oranie region. The genre appealed to the Morrocan youth too, and today Aymane Serhani and Zohair Bahaoui are among the most popular Raï, Pop artists of their generation.

Beyond the Maghreb, a new generation of artists in Europe of North African descent, such as Tiiwtiiw (Belgian-Moroccan), DJ Kayz (Franco-Algerian), DJ Hamida (French-Morrocan), is mixing Rap, R’n’B, and Pop with a Maghrebi Raï touch.

Top 10 Rai artists in terms of popularity on Spotify
Top 10 Raï artists on Spotify

Note: One can argue whether Anas, Balti, Didine Canon 16 are really Raï singers…well, according to Spotify yes!

Genres assigned to Didine Canon 16

As of today, the total number of artists on Spotify who are assigned Raï as a genre is 296. I’m clearly missing a lot of artists…and the reason is that some artists don’t have any genre assigned to them on Spotify.

Query history of search by genre

To extract more Raï artists, I’ve added a query to search artists by name. The Raï world is rife with creative artist names (Houari Dauphin, Kader Japoni, Warda Charlomanti…etc), with the prefix Cheba/Cheb being the best known of the genre.

So, I’ve extracted all the Cheba/Cheb artists and sorted the result by popularity— Cheb Mami (Algerian artist) is the most popular Cheb on Spotify with a popularity index of 58, and Chebba Maria (Moroccan artist) the most popular Cheba on Spotify.

Search Raï artists by name ‘Cheb’, ‘Cheba’

Then, I wanted to visualize in a pie the proportion of male vs. female Raï artists. Clearly, Raï is dominated by men.

Male vs. female Raï singers

What makes Raï songs so likeable?

For every track, Spotify provides data for Audio Features. The Spotify Web API developer guide defines them as follows:

  • Valence: A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track.
  • Energy: Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. Typically, energetic tracks feel fast, loud, and noisy.
  • Danceability: Danceability describes how suitable a track is for dancing. A value of 0.0 is least danceable and 1.0 is most danceable.
  • Liveness: Higher liveness values represent an increased probability that the track was performed live. A value above 0.8 provides strong likelihood that the track is live.
  • Acousticness: A confidence measure from 0.0 to 1.0 of whether the track is acoustic. 1.0 represents high confidence the track is acoustic.
  • Speechness: Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the recording (e.g. Rap, poetry), the closer to 1.0 the attribute value.

I’ve used Radar charts to visualize the audio features of a track. I’ve started by looking into individual tracks. Let’s take a look at two hits from Khaled, Didi, and C’est la Vie.

You can already notice that both songs score mid to high on energy, danceability, and valence. Aha! That may explain why Khaled songs appeal to even non-Arabic speakers.

Now, let’s take a look at a newer song, Frontières, from DJ Hamida, Cheb Bello, and Anas. Here again, the song scores high on energy and danceability.

Next, let’s take a look at 10 Raï songs. You can clearly start seeing patterns emerging among those songs:

  • Barring two Khaled songs (Delali with GASHI, Benthi with Melissa M), all other songs score high on danceability (above 60%)
  • All songs are mid to high on energy (60–90%)
  • All songs are low on acousticness & speechiness i.e. all Rai songs have very few parts where spoken words are the predominant part in the song.
  • Barring the hit “Abdel Kader — Live at Bercy (Paris)” by Faudel, Khaled, Rachid Taha, all songs score low to mid on liveness (0–40%)
  • Valence is pretty spread out (30–80%).

A piece of advice if you want to release a Raï song? To increase your odds, make it highly energetic, and danceable, record the song in a studio (don’t release a live version), use electric beats (don’t release an acoustic version), have vocals in your song but not too much.

--

--

Tinhinane

Cloud Engineering Manager in Belgium's IT Consulting Scene 🇧🇪 | Just as you wouldn't put pineapple on pizza, couscous n' merguez is a no go!