<graph mode="slice" defaultedgetype="directed" timerepresentation="timestamp" timestamp="1">
2017-02-16
last modified: 2023-04-10
== !
I organize online workshops and personalized trainings for Gephi, for beginners and experts. To schedule one or to get more information: analysis@exploreyourdata.com.
We are going to create one very simple non dynamic network (network "A").
then we will create a modified version of it (network "B").
in both files, we need to modify a single line.
finally, we will merge networks A and B, forming a new dynamic network evolving from version A to B.
The creation of the 2 networks is not a mandatory step: you can use your own network files, as long as they are in gexf file format. In this case, skip to here. We create the networks in this tutorial to provide the most simple and clear case. |
open Gephi. On the Welcome screen that appears, click on New Project
Our project is empty. We can use a simple click-and-point tool to create a network:
When you have created a couple of nodes, click again on the pencil icon to stop the node creation.
Export the network as a file and call it "network A":
Clicking on "Save" saves the file in the folder you chose. You are back to the view on your graph.
Now, click on the "Edge pencil", just below the "Node pencil we have used (careful, the icons are identical!)
Create one edge, or a couple of edges, in this way.
Clicking again on the pencil stops the edge creation by mouse clicks.
Then export the network in the same folder where we put the previous file (File → Export → Graph File …
)
This time, name the file 'network B.gexf' and remember to choose the gexf
file format just like we did before.
Delete and replace this line by this one:
<graph mode="slice" defaultedgetype="directed" timerepresentation="timestamp" timestamp="1">
See timestamp="1"
? It means this will be the first "time slice" of your dynamic network.
Save the file.
Repeat the steps for network B.gexf:
open the file in a text editor,
find the line <graph defaultedgetype="directed" mode="static">
replace it by:
<graph mode="slice" defaultedgetype="directed" timerepresentation="timestamp" timestamp="2">
(see that we have timestamp="2"
here: this is going to be the second time slice!)
save the file.
We will use the 2 files network A.gexf and network B.gexf that we have created.
First, let’s close the project we have in Gephi, without saving:
Then click on File → Open
and navigate to the folder where network A.gexf and network B.gexf are located:
Here, make sure you select the 2 files at once (using the key Ctrl on pc or {commandkey} on mac).
Opening the files display a report window:
You should see this button, click on it (if not: something went wrong. Retrace your steps)
Click and slide the right side border of the timeline to the left. You should see the edge disappear:
We created a dynamic network. It needs to be animated precisely with the timeline, dynamic attributes should be explored, as well as dynamic layouts.
These features will be explained in the coming tutorials on dynamic networks with Gephi.
Visit the Gephi group on Facebook to get help,
or visit the website for more tutorials
Give a try to nocodefunctions.com, the web application I develop to create networks for Gephi. Click-and-point, free, no registration needed.