
PARTITION
Partition a network diagram into sections in Gephi

In this post, we will learn how to partition the network diagram into section. There are two reasons for partitioning. First, we might want to focus on or explain what’s happening in a sub-network. Second, we might want to compare the structure of one sub-network with another and explain why one is more successful than the other.
We will basically filter the purple nodes from our main network (fig. 1), select these nodes, and copy them to a new workspace.
Step 1: Filter nodes
- Make a copy of the yifanhu.gephi file and rename the copy to partition.gephi.
- Go to the Data Laboratory tab. On the bottom left, click Add column and name that column to Cluster1 (fig. 2).
- All five journals listed below are on the top rows.
For each journal, right click on the journal name, select Edit Node.
It will bring up the Attributes dialog box.
In the last row, replace
**<null value>**with partition. The value partition will appear in the column Cluster1 for that journal. - Journals list: Evergreen Review, The Floating Bear: A Newsletter, Fuck You: A Magazine of the Arts, Intrepid, and Yūgen.
- Save the file: File > Save.
Step 2: Move the filtered nodes to a workspace
This step is slightly complicated. Please have some patience.
- Go to the Overview section, and select Filters tab on the right panel.
- In the Filters tab, open the Topology folder by clicking on the arrow (fig. 3). Drag Neighbors Network option from Topology to the Queries panel below. Click the Select option.
This will select the neighbor nodes for each node we will filter next.
- In the Queries panel, click the dropdown arrow next to Neighbors Network, and you’ll see Drag subfilter here option.
- Drag Cluster1 from the Filters panel to this Drag subfilter here area (fig. 4): Filters > Attributes > Partition > Cluster1 > drag to Drag subfilter here.
- In the Queries panel, inside the Neighbors Network, click on Partition (Cluster 1). It will display Partition (Cluster 1) Settings. Click partion (0.67%) and click Select.
This will select the journal nodes, together with the connected poet nodes, that we’ve labeled partition in the Data Laboratory earlier.
- Copy the selected nodes to a new workspace (fig. 4): Right click on the graph, then > Copy 365 nodes to > New Workspace.
- Save the file: File > Save.
- Click the Workspace 2 on top of the network diagram and you can see our partitioned section.
Step 3: Change the design of the new graph
Let’s quickly change the design of our new network diagram.
- Run the Yifan Hu algorithm in the Layout panel (fig. 5).
- In the Appearance panel, change the Node color, Node size, and Label Size.
- Change node color to gray: Nodes > Color (palette icon) > Unique > Apply.
- Change node size: Nodes > Size (ring icon) > Ranking > Choose and attribute > Degree > Min size: 5 > Max size: 100 > Apply.
- Change node label size: Nodes > Label Size (TT icon) > Ranking > Choose an attribute > Degree > Min size: 3 > Max size: 5 > Apply.
- In the More Settings panel below the diagram, in Node Labels tab, check Show and change style Font > Style > Regular.
Export the image when you’re satisfied with the graph.
- Go to the Preview tab and make sure Workspace 2 is selected.
- Select our demo settings under Presets.
- Go to the Export option at the bottom left of the screen, click on SVG/PDF/PNG. Change image settings: Click on Options… In this dialog box, change Width 6400 > Height 3600 > Ok. Save the image in the begin folder: Save In > gephi-intro folder > begin folder > Files of Type: PNG files > File Name: partition.png. Click Save.
- Save the file: File > Save.
The figure looks like this (fig. 6). Why did the community detection algorithm put these five journals as part of the same community. Well, go back to the Overview section and hover over any of the journal nodes. You’ll see that one group of poets might be present in a few journals only, and another group of poets might be present in other journals. Yet all of these journals are connected to the same poets, that is, they have overlapping representation. Even the Evergreen Review journal, which seems disconnected from the network, is connected to a small group of poets that that are connected to every journal in this network. In other words, this is a close-knit community, which means that the cluster will remain intact even if you remove a journal.