Importing Jung-created GraphML files

Get help with your data
Post Reply [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
rzelnio
Posts:3
Joined:17 Jan 2011 21:06
[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
Importing Jung-created GraphML files

Post by rzelnio » 25 Jan 2011 19:09

I have a large database application that creates graphs using Jung and exports them using Jung's GraphMLWriter. There is an annoying issue with Jung in that it doesn't save the attr.type information. When it exports an attribute, it does so in the format:

<key id="label" for="node">
<desc>string</desc>
<default>xxx</default>
</key>

With desc being just about anything you want it to be but my particular group is using the attr-type definition in the "desc".

Now, the issue I am having is that when I read in the file into gephi, it puts a severe warning that there is no type defined and defaults everything to string. This unfortunately means I cannot do any sizing/coloring/filtering or other functions which require this data to be in a number format.

What I've done to work around this for now is to create a new column which is of the correct data type and then use the "copy data to other column" to retypecast the data. This isn't too elegant and I was wondering if there is something I am missing that allows you to convert a column to a new data type?

Better yet, it would be even better if on import it would just ask you what the data type is for something on the opening of the file similar to how it does it for the csv rather than just defaulting it to string.

admin
Gephi Community Manager
Posts:964
Joined:09 Dec 2009 14:41
[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: Importing Jung-created GraphML files

Post by admin » 26 Jan 2011 14:37

Hi,

You did it well, and your last remark is also valuable. I add this to the Idea List.

Post Reply
[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
[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