Long shot? xml/gexf...
 

MegaSack DRAW - This year's winner is user - rgwb
We will be in touch

[Closed] Long shot? xml/gexf text generator

6 Posts
5 Users
0 Reactions
88 Views
Posts: 0
Free Member
Topic starter
 

I'm doing some social network analysis using a program called Gephi. It creates graphs using a file format called .gexf which uses xml. The .gexf file is a list of nodes and connections and involves lots of repetition, e.g.:

<node id="1000" label="Barry"/>
<node id="0" label="Matthew"/>
<node id="1" label="Frank"/>
<node id="2" label="Matt"/>
...
<node id="100" label="Simon"/>
</nodes>

<edges>
<edge id ="1" source="1" target="1000" weight="13"/>
<edge id ="2" source="2" target="1000" weight="11"/>
<edge id ="3" source="3" target="1000" weight="8"/>
...
<edge id ="101" source="100" target="1000" weight="8"/>
</edges>

To save copying and pasting, then renumbering lines (which is annoying), is there a program that will generate lines with numbers changed (either online or for a Mac)?


 
Posted : 23/04/2011 3:19 pm
Posts: 0
Free Member
 

I concur.


 
Posted : 23/04/2011 3:20 pm
Posts: 27
Free Member
 

Not really sure what you mean with all the line numbering, got an example of what you're trying to achieve?

If you're trying todo funky stuff with XML, maybe look at XSLT.


 
Posted : 23/04/2011 3:24 pm
Posts: 349
Free Member
 

I'm guessing that the means the edge weight between nodes? I don't know any tools but it'd be a pretty simple coding job I reckon.


 
Posted : 23/04/2011 3:27 pm
Posts: 0
Free Member
Topic starter
 

More info.

I'm using gephi to make a social network diagram, one of these:

[img] [/img]

It is made of up nodes (the pink cirles) and edges (lines connecting nodes)

You create a gexf file which contains all the info about nodes (e.g. their unique ID number and labels) and info about edges (e.g. their unique ID number, where they originate and end, the strength of the connection - weighting).

You have to write an individual line for each node, and connection. I'm going to end up with 1000s of nodes and connections so copying and pasting, then changing the numbers is getting boring fast, so i was hoping there was a something which could generate the standard lines, but with the ID numbers and source numbers automatically changed.


 
Posted : 23/04/2011 3:31 pm
Posts: 0
Free Member
Topic starter
 

I've figured out how to do it in Excel, with some help from someone on another messageboard - STW has been defeated by a wendyball forum!

😯


 
Posted : 23/04/2011 4:04 pm
Posts: 77691
Free Member
 

Cos we're all out riding our bikes rather than sitting at home next to a computer watching football.


 
Posted : 23/04/2011 5:24 pm