Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
198 lines (134 sloc) 7.2 KB

Creating a simple dynamic network

last modified: 2018-07-17

gephi logo 2010 transparent

1. Goals of this tutorial

  • 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.

Note

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.

2. Open a new project in Gephi

  • open Gephi. On the Welcome screen that appears, click on New Project

pub?w=926&h=534
Figure 1. Open a new project

3. creating network "A"

Our project is empty. We can use a simple click-and-point tool to create a network:

pub?w=926&h=534
Figure 2. Icon for node creation
pub?w=639&h=533
Figure 3. A few nodes have been created

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":

pub?w=654&h=296
Figure 4. Exporting the network
pub?w=682&h=314
Figure 5. Choosing the gexf file format

Clicking on "Save" saves the file in the folder you chose. You are back to the view on your graph.

4. Creating network "B"

Now, click on the "Edge pencil", just below the "Node pencil we have used (careful, the icons are identical!)

pub?w=926&h=534
Figure 6. Choosing the gexf file format

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.

5. Modifying just one line in the files network A.gexf and network B.gexf

From your computer, open network A.gexf with a text editor (don’t use Microsoft Word!):

(here is how to do it on a Mac, and on Windows).

pub?w=1440&h=1080
Figure 7. The network file opened

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.

6. Merging network "A" and "B" into a dynamic network

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:

pub?w=1440&h=1080
Figure 8. Closing the current project

Then click on File → Open and navigate to the folder where network A.gexf and network B.gexf are located:

pub?w=1417&h=938
Figure 9. Opening files

Here, make sure you select the 2 files at once (using the key Ctrl on pc or {commandkey} on mac).

pub?w=1372&h=857
Figure 10. Opening 2 files at once

Opening the files display a report window:

pub?w=1443&h=1014
Figure 11. Import report window

7. Enabling the timeline

You should see this button, click on it (if not: something went wrong. Retrace your steps)

pub?w=1433&h=815
Figure 12. Enable the timeline

Click and slide the right side border of the timeline to the left. You should see the edge disappear:

pub?w=1316&h=748
Figure 13. Sliding the timeline

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.

8. More tutorials on dynamic networks with Gephi

the end