Are you a beginner in Gephi? Make your first network now!

Dr. Veronica Espinoza
7 min readJun 19, 2024

--

By Dr. Verónica Espinoza, June 19, 2024

▪Twitter (X) @Verukita1LinkedIn: Dra. Verónica Espinozawebsite: www.nethabitus.org

Network by the author

INTRODUCTION

¿What is Gephi?

Gephi is a tool for data analysts and scientists keen to explore and understand graphs. Like Photoshop™ but for graph data, the user interacts with the representation, manipulate the structures, shapes and colors to reveal hidden patterns [1].

The goal is to help data analysts to make hypothesis, intuitively discover patterns, isolate structure singularities or faults during data sourcing. It is a complementary tool to traditional statistics, as visual thinking with interactive interfaces is now recognized to facilitate reasoning. This is a software for Exploratory Data Analysis, a paradigm appeared in the Visual Analytics field of research [1, 2].

Gephi interface

Main sections of Gephi.

Figure 1. Three different ways of working with data. (Image by the author)
Figure 2. Different sections to work your networks. (Image by the author)

😉Learn more about Gephi in this story I wrote: What is Gephi? Meet this useful network analysis tool.

🌐 Download Gephi here: https://gephi.org/

What will we review in this story?

In this tutorial, we will learn how to visualize your first Gephi network in 5 steps. For this exercise, I will use a GEXF file that I previously generated with Python code using the Spotify API. This file represents a network of related artists on Spotify.

I am sharing the same GEXF file that I will use in this tutorial so you can follow along with the exercise!

👉Download here the GEXF file for this exercise.

Figure 3. Process to download the GEXF file for this exercise.

Note:
It is important to mention that the settings and parameters proposed for this exercise are merely examples designed to familiarize you with the functions and controls of Gephi. However, these parameters will vary depending on your specific network. You must adjust them based on your data and viewing needs. This exercise is intended to help you understand the logic behind Gephi’s functions, enabling you to visualize your own networks by making the necessary adjustments.

Visual summary of the 5 steps that we will review in this tutorial.

Figure 4. Visual Summary of the 5 steps in this Tutorial (Image by the author).

🏁 Lets start!

Step 1. Apply statistics: run modularity.

In your Gephi tool / Overview Tab:

  • Open the GEXF file I shared with you. File ➡ Open file.
  • In the statistics section: Apply Modularity ➡Ok.

Learn about the Modularity Algorithm here & here

🎦 Below is a demonstration of this step. Open the file — Apply statistics: run modularity.

Figure 5: Step 1 — Apply Statistics: Run Modularity (by the author).

Step 2. Adjust appearance.

Overview Tab / Appearance section:

  • Color nodes by modularity (Path: Color icon Nodes Partition Select Modularity Class Apply ▶)
  • Rank the size of the nodes by followers (Path: Size icon NodesRanking ➡select followers adjust Min size: 2, Max size: 14 Apply ▶)
  • Adjust the font size by followers (Path: Label Size icon Nodes Ranking ➡ select followers adjust Min size: 0.3, Maz size 0.5 Apply ▶)

🎦 Below is a demonstration of this step — Adjust appearance.

Figure 6: Step 2— Adjust appearance (by the author).

Step 3. Apply Layout.

Overview Tab / Layout section :

  • Apply ForceAtlas 2
  • Select Prevent Overlap
  • ▶Run ➡◼Stop

Learn about ForceAtlas 2 Layout Algorithm in this paper

🎦Below is a demonstration of this step — Apply Layout.

Figure 7: Step 3— Apply Layout (by the author).

Step 4. Adjust Preview Settings.

Preview tab / Preview Setting Section:

  • Presets — Select Default.
  • Settings tab➡Node labels ➡Select Show labels Refresh
  • Manage renderers tab ➡ Move “Default node labels” to first ⬆ position ➡ Refresh.
  • Settings tab ➡Edges ➡Select Rescale weight ➡ Adjust Thickness (0.5) ➡ Refresh.

🎦 Below is a demonstration of this step — Adjust Preview Settings.

Figure 8: Step 4— Adjust Preview Settings (by the author).

Step 5. Save the network.

Preview tab

  • Click Export (SVG / PDF / PNG).
  • Name your network ➡Clic Options ➡Adjust the width and height of the image ➡ OK

🎦 Below is a demo of this step — Save your network.

Figure 9: Step 5— Save your network (by the author).

😉Your first network is ready now!

Conclusions

In this tutorial, we reviewed how to create your first network in Gephi. The steps shown here were just an example intended to familiarize you with the functions that Gephi offers.

As I mentioned above, depending on your network file, you will need to readjust the parameters we reviewed in this tutorial. For example, try coloring the nodes by another attribute available in your file. You can also rank the node size and its label by different attributes by adjusting the minimum and maximum numerical values according to your file.

I encourage you to upload your own file and experiment with adjusting the various parameters we reviewed. You can also switch to different layouts to see what your network looks like

Additionally, in the preview tab, try making any adjustments you consider necessary for your file.

Keep in mind that your parameter settings will depend on your specific viewing needs.

I hope this tutorial has been useful for you to start using this wonderful tool for your own projects.

If you performed the exercise described in this tutorial, I would love to hear how it went and, if possible, share the image of your network. Feel free to share your results with me! You can reach me at: vespinoza.bs@gmail.com

😉Thanks for reading this story.

👉Find more stories that I have written here

✔Follow me on Twitter (X) @Verukita1

✔LinkedIn: Dra. Verónica Espinoza

✔website: www.nethabitus.org

Resources

🌐 Gephi website.

💠¿Do you want to continue learning more about Gephi? Review my gephi Stories:

📕 Find open acces resources about Network Science in this Story I wrote: Network Science: Open access resources (books, chapters, articles, tools & more)

📄 Read this paper: Fast unfolding of communities in large networks

✅ Github: Modularity Github-Gephi

🗄️Find Datasets: The Gephi sample datasets are available in various formats (GEXF, GDF, GML, NET, GraphML, DL, DOT).

🧍 Follow the Gephi community on the different social networks like: Gephi FB group, Twitter and Reddit.

REFERENCES

[1] 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

[2] Gephi — The Open Graph Viz Platform [Internet]. [cited Jun 15, 2024]. Available in: https://gephi.org/

--

--

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