Import doesn't seem to recognise attributes: R/igraph -> Pajek -> ORA

108 views
Skip to first unread message

Jason Whyte

unread,
Mar 3, 2021, 5:41:18 PM3/3/21
to ORA Google Group
Hello ORA Community,
I'm just starting to get involved with dynamic networks using ORA-Lite (on Mac, under Parallels virtual Windows environment).

I've done a lot of text mining/data cleaning in R, using igraph to
make static networks. I've done my best to export these into the correct
Pajek format, using tables of correspondences between attributes for
igraph and Pajek, e.g.
(It may be that igraph is not completely reproducing features of the Pajek .paj/.net files, but I'm taking that issue up elsewhere.)
It doesn't seem practical to export igraph to GraphML format as that will not record
the vertex labels.

For now, I've found that I can load a .paj file (or many of them) into ORA, and the vertices are appropriately labelled. Other attributes are not automatically recognised, but I've found that I can use R/igraph to store vertex sizes in a Pajek attribute that ORA can see (x-coordinate or y-coordinate so far).
I can also use ORA to change the edge weights from the default using information from the .paj file.

However, I cannot get ORA to see the colour information written to the .paj file as
the popup box resulting from "Node Appearance > Node Color > Color Nodes by Attribute or Measure" does not show this under the "select an attribute" drop-down menu.

I also seem to be unable to use where I've placed vertex sizes (e.g. recognised by ORA as an x-coordinate attribute) to resize all the vertices across the time slices of a dynamic network (made by combining individual .paj imports of static networks) with a single set of commands (only the network at one time step is changed) so tips on that kind of global operation are also welcome.

I hope someone has some tips for me.
Perhaps it would help if someone could supply a list of attributes that ORA can recognise
from a Pajek input file? I tried to experiment with the Pajek format example from Page 17 of the ORA 2018 user guide, and found the vertex colour information there was also ignored on importing to ORA-Lite.

Best regards,
Jason


Kathleen Carley

unread,
Mar 3, 2021, 6:02:28 PM3/3/21
to ORA List
It may be that ora is not importing all pajek features
it may also be easier for you to just tell us the easiest form of the data

the reason we use dynetml and not graphml is partly due to the fact graphml does not handle attributes.  But don't worry about exporting to that either.

If you have a network of links and a sv file with the node ids and then attributes - one attribute per column
you can import the two and merge in ora.

there is a video on the netanomics web site that might help.

Also feel free to send us a sample pajek file


--
Computational Analysis of Social and Organizational Systems (CASOS)
The Institute for Software Research, Department of Computer Science
Carnegie Mellon University, Pittsburgh, PA, USA
http://casos.cs.cmu.edu/
---
You received this message because you are subscribed to the Google Groups "ORA Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ORA-google-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ORA-google-group/fa72ab6c-478b-4332-95c5-34e8cb8236bbn%40googlegroups.com.

Jason Whyte

unread,
Mar 3, 2021, 7:03:45 PM3/3/21
to ORA-goog...@googlegroups.com
Hello,
thanks for the speedy comments.

To illustrate the problems of missing attributes from Pajek (.paj, but the alternative .net did not make any difference), please find attached the .paj file I made using the 2018 ORA manual Pajek example cited above: "ORA_net_test.paj"

I've also attached a slightly more complex file I exported from R/igraph to Pajek format that tries to record some
more attributes: "test_export.paj"
(I had to process this to remove quotations added by R to the node colours and shapes, I've advised the igraph forum of this.)

I do not have a preference regarding the data export format (from R), I just might be limited by what igraph (or other packages that allow me to transform igraph to some other R graph format) will allow. 
Also, I might be dealing with 30-40 networks at some stage, each with its own attributes, so I'm keen to know what's an
efficient way to proceed.

I just would like to retain:
1. edge weights/thickness
2. vertex sizes
3. vertex labels
4. (ideally) vertex colours

When you wrote (with my bold) : "
" If you have a network of links and a sv file with the node ids and then attributes - one attribute per column
you can import the two and merge in ora. "

I don't know about sv - or did you mean a .csv file (comma-separated format)? Maybe I should drop everything and find that video you mentioned.

Warm regards,
Jason

p.s. I was unable to send this reply directly from the ORA Google group: "Error posting message" popup.

test_export.paj
ORA_net_test.paj

Jason Whyte

unread,
Mar 3, 2021, 9:09:06 PM3/3/21
to ORA-goog...@googlegroups.com
Hello again,
I just wanted to record a discovery for R and dynamic networks in case this becomes useful for ORA transfer.
The package rgexf claims it can
"Create, read and write 'GEXF' (Graph Exchange 'XML' Format) graphfiles (used in 'Gephi' and others)."

The xml produced is not immediately amenable to an import to ORA, but I suspect it will end up being more efficient to
work with a format that can handle dynamic networks compared to static slices and assembling in ORA.

Comments welcome.

Best regards,
Jason

Jason Whyte

unread,
Mar 4, 2021, 3:48:39 AM3/4/21
to ORA-goog...@googlegroups.com
Hello,
I should have put this in the first email:
I'm using the ORA_Lite trial version
Version: 3.0.9.9.116
Build Date: August 26, 2020

Best Regards,
Jason

--
Computational Analysis of Social and Organizational Systems (CASOS)
The Institute for Software Research, Department of Computer Science
Carnegie Mellon University, Pittsburgh, PA, USA
http://casos.cs.cmu.edu/
---
You received this message because you are subscribed to a topic in the Google Groups "ORA Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ORA-google-group/MwYppU88M7U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ORA-google-gro...@googlegroups.com.

Kathleen Carley

unread,
Mar 4, 2021, 9:58:01 AM3/4/21
to ORA List
thanks - we are looking in to all formats right now



Kathleen Carley

unread,
Mar 4, 2021, 10:07:53 AM3/4/21
to ORA List
aok - 
that does handle attributes


You received this message because you are subscribed to the Google Groups "ORA Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ORA-google-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ORA-google-group/CANqGGsMpt4BZ1Dbpy%2BVL16zeuLPtXQzYu7BHD7M0LQ9QNwhsmA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages