graphMLnode data importing as property rather than attribute

Once it's running
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
axfelix
Posts:5
Joined:17 May 2012 16:35
[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
graphMLnode data importing as property rather than attribute

Post by axfelix » 05 Jun 2012 16:03

Hey there,

I'm having a bizarre issue where one of my node data keys keeps importing as a property rather than an attribute and I can't seem figure out what's causing it. See the below example: it's "listed_count" that's giving me trouble. Thanks!

<?xml version="1.0" encoding="utf-8"?><graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key attr.name="weight" attr.type="int" for="edge" id="d4" />
<key attr.name="weight" attr.type="int" for="node" id="d2" />
<key attr.name="screen_name" attr.type="string" for="node" id="d1" />
<key attr.name="listed_count" attr.type="int" for="node" id="d3" />
<key attr.name="followers_count" attr.type="int" for="node" id="d0" />
<graph edgedefault="directed">
<node id="30924802">
<data key="d0">65765</data>
<data key="d1">jeffreypjacobs</data>
<data key="d2">171</data>
<data key="d3">954</data>
</node>
</graph>
</graphml>

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[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: graphMLnode data importing as property rather than attri

Post by eduramiba » 06 Jun 2012 19:14

Hi,
It seems that "d3" is associated with the label property for nodes.
The reason is that "d3" is the default node label used by yEd from yworks.com. It also associates "d7" to edge labels.

Change yours to d5 or something else than d3 and it works.

You can check all property associations here https://github.com/gephi/gephi/blob/mas ... aphML.java

Eduardo

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