How to visualize a Spotify Network in Gephi in just a few steps!

Dr. Veronica Espinoza
5 min readJan 16, 2023

--

Dr. Verónica Espinoza, 2022.

Twitter @Verukita1

LinkedIn: Dra. Verónica Espinoza

Network by the Author

Spotify is a Swedish multimedia services company founded in 2006, whose product is the homonymous application used to play music via streaming. Its business model is called freemium, which consists of offering a basic free service with advertising and another with additional features (such as better audio quality, free of advertising and unlimited use) through a paid subscription [1].

In this tutorial we will use a tool (open source-web based) to download the data related to the artist of our choice. This tool allows us to explore networks of related artists on Spotify through its API. And the most interesting thing is that this tool offers us to download the generated file (gdf format) ready for visualize it in Gephi [2].

If you want to know more about Gephi, I share this story I wrote on Medium [3].

🚩Let’s start!

Steps to generate a spotify network in Gephi.

STEP 1. Open Spotify Artist Network tool [4] and type the artist of your interest (in this example I typed “The Beatles”). This website allows for exploring networks of related artists on Spotify via its API.

Figure 1. Spotify data via Spotify Artist Network tool (By the author).

STEP 2. Click in download network as gdf file (for visualization in gephi), and then open this file in your Gephi tool, as it’s shown in the following.

Figure 2. Download gdf file and open it in Gephi (By the author).

STEP 3. Run the option of Modularity Class to detect communities (statistics section), color the nodes by partition (appearance section) and run the Force Atlas 2 layout.

Figure 3. Apply statistics, color nodes, and run the layout (By the author).

STEP 4. Finally make the adjustments of your choice in the appearance section. For example, you can rank the size of the nodes by “followers” or “popularity”, adjust the size of the labels by the attribute you want, run “Noverlap” (layout section) so that the nodes can be better appreciated.

Figure 4. Settings of your choice (By the author).

Your network is ready now!

Figure 5. The Beatles Artist Network on Spotify (By the author).

👉These steps were just an example, but you can apply your own stats, color the nodes based on other attributes, or you can run whatever layouts you want!

🙂Use your creativity!

Examples of Spotify Networks

Next, I show you other examples that I did about Spotify Networks.

a) Metallica Artist Network on Spotify

(Radial Axis Layout)

Figure 6. Metallica Artist Network on Spotify (Network by the author).

b) Led Zeppelin Artist Network on Spotify

(Dual circle Layout + Network Splitter 3D)

Figure 7. Led Zeppelin Artist Network on Spotify (Network by the author).

c) Led Zeppelin Artist Network on Spotify

(Radial Axis Layout + Network Splitter 3D)

Figure 8. Led Zeppelin Artist Network on Spotify (Network by the author).

d) Queen´s artist network on Spotify

(Force Atlas Layout + Filters by Modularity Class)

Figure 9. Queen´s artist network on Spotify (Network by the author).

References

  1. Spotify. In: Enciclopedia SpeedyLook [Internet]. 2022 [cited 2022 Dec 20]. Available from: https://es.wikipedia.org/w/index.php?title=Spotify&oldid=147698807
  2. Bastian M., Heymann S., Jacomy M. (2009). Gephi: an open source software for exploring and manipulating networks. International AAAI Conference on Weblogs and Social Media
  3. Verónica Dr. What is Gephi? Meet this useful network analysis tool [Internet]. Medium. 2022 [cited 2022 Dec 21]. Available from: https://medium.com/@vespinozag/what-is-gephi-meet-this-useful-network-analysis-tool-628a1b42428c
  4. Spotify Artist Network [Internet]. [cited 2022 Dec 21]. Available from: https://labs.polsys.net/playground/spotify/

--

--

Dr. Veronica Espinoza

👨‍🎓 PhD Humanities 🧠M. Sc Neurobiology 🧪B.S. Chemistry. 👉 X: @Verukita1 😉 Support my work here: https://acortar.link/1ZonMU 🌐website: www.nethabitus.org