I am trying to use NetworkX to build a network with dynamic node attributes. I have tried the following:
import networkx as nx
G=nx.Graph()
G.add_node('A', attr_dict={'data': 1, 'start' : "1990-01-01", 'end' : "1993-01-01"})
G.add_node('B', attr_dict={'data': 2, 'start' : "1992-01-01", 'end' : "1993-01-01"})
However, when writing using nx.write_gexf(G, 'test.gexf')
the file loads into Gephi fine but no timeline is showing up.
What is the correct format for entering dynamic node attributes into networkx nodes for writing to gexf file?
Your code is correct, but you need to generate the time interval inside Gephi in the Data Laboratory. See with the network generated with your code:
Merging the columns
Formatting the time
Please note that from version 0.9 onwards Gephi will support timestamps: