I know it is possible to append a second graph to a first graph.
1st question: Is it possible to merge the attributes of the nodes and edges to the attributes of the first existing graph?
For example:
graph 1:
"Node A" has attribute X=12, Y=4
"Node B" has attribute X=1, Y=2
"Edge AB" has attribute E=1.02
graph2:
"Node A" has attribute X=4, Y=16
"Node B" has attribute X=1, Y=2
"Edge AB" has attribute E=1
"Edge BA" has attribute E=1
Merged graph has to be: (all nodes and edges, sum of attribute values)
"Node A" has attribute X=16, Y=20
"Node B" has attribute X=2, Y=4
"Edge AB" has attribute E=2.02
"Edge BA" has attribute E=1
2nd question: Is it possible to do this for 100 graphs?
Thanks in advance!
Appending graphs and attributes
Re: Appending graphs and attributes
Hi,
What you could do is:
- change the name of the attribute X in he second graph.
- append this second graph to the first one.
- use the merge attributes functionalities to merge your att X with the att you had renamed.
This said,
- this is the kind of operation that you'd rather do in a spreadsheet before importing to Gephi (or after exporting a graph from Gephi, before reimporting).
- this cannot be automatized with the desktop version of Gephi. you'd neee to use programming for that (possibly using the Gephi toolkit if it helps)
Best,
Clement
What you could do is:
- change the name of the attribute X in he second graph.
- append this second graph to the first one.
- use the merge attributes functionalities to merge your att X with the att you had renamed.
This said,
- this is the kind of operation that you'd rather do in a spreadsheet before importing to Gephi (or after exporting a graph from Gephi, before reimporting).
- this cannot be automatized with the desktop version of Gephi. you'd neee to use programming for that (possibly using the Gephi toolkit if it helps)
Best,
Clement
-
- Posts:4
- Joined:04 Aug 2014 14:28 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Appending graphs and attributes
Hi!
Thanks for the information.
I fixed the problem by combining the attributes using python before importing in Gephi.
Best regards!
Thanks for the information.
I fixed the problem by combining the attributes using python before importing in Gephi.
Best regards!