Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error saving any dynamic network in gexf format #1426

Closed
kbaltakys opened this issue Mar 15, 2016 · 13 comments
Closed

Error saving any dynamic network in gexf format #1426

kbaltakys opened this issue Mar 15, 2016 · 13 comments

Comments

@kbaltakys
Copy link

I want to save a dynamic network in Gephi, to gexf file format, however even if I try to save the most simple dynamic network, gexf file abruptly ends in the midle of first edge definition : <edge id="0" source="0" target="1"

I figured to make a small graph in Gephi, with 4 nodes:
image

image

One link:
image

image

image

image

image

image

And then the whole output from in the gexf file is:

<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.3" version="1.3" xmlns:viz="http://www.gexf.net/1.3/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.3 http://www.gexf.net/1.3/gexf.xsd">
  <meta lastmodifieddate="2016-03-15">
    <creator>Gephi 0.9</creator>
    <description></description>
  </meta>
  <graph defaultedgetype="undirected" timeformat="date" timerepresentation="interval" mode="dynamic">
    <attributes class="edge" mode="dynamic">
      <attribute id="weight" title="Weight" type="double"></attribute>
    </attributes>
    <nodes>
      <node id="0" label="0">
        <viz:size value="10.0"></viz:size>
        <viz:position x="-188.27417" y="121.794495"></viz:position>
      </node>
      <node id="1" label="1">
        <viz:size value="10.0"></viz:size>
        <viz:position x="-319.27448" y="451.20123"></viz:position>
      </node>
      <node id="2" label="2">
        <viz:size value="10.0"></viz:size>
        <viz:position x="471.24677" y="126.6817"></viz:position>
      </node>
      <node id="3" label="4">
        <viz:size value="10.0"></viz:size>
        <viz:position x="-309.86188" y="-274.00354"></viz:position>
      </node>
    </nodes>
    <edges>
      <edge id="0" source="0" target="1"

Am I doing something wrong or is this a bug?
I would like to use Gephi for the analysis and visualization of dynamic networks, but for that I need to be able to save the dynamics into a file :) Any suggestions are welcome.

@eduramiba eduramiba self-assigned this Mar 15, 2016
@eduramiba
Copy link
Member

Hi, there is currently a known bug when converting weight column to dynamic from Data laboratory.
Maybe you can workaround this by loading an empty gexf with dynamic weight.

@kbaltakys
Copy link
Author

Could you explain a bit what you mean?

@eduramiba
Copy link
Member

Yeah, I understand you want to create a dynamic network with dynamic weight and fill it manually from data laboratory.
If you convert the weight to dynamic it won't work correctly at the moment.

But I think you can workaround this problem by loading a gexf file without nodes or edges, but with dynamic weight, which works correctly.

Try loading this gexf:

<gexf xmlns="http://www.gexf.net/1.1draft"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.gexf.net/1.1draft
                             http://www.gexf.net/1.1draft/gexf.xsd"
      version="1.1">
  <graph mode="dynamic" defaultedgetype="directed">
    <attributes class="edge" mode="dynamic">
       <attribute id="weight" title="Weight" type="float"/>
    </attributes>
    <nodes>
    </nodes>
    <edges>
    </edges>
  </graph>
</gexf>

@kbaltakys
Copy link
Author

But even if I load your minimal gexf, add a dynamic edge and try to save it, the same problem persits, i.e. gexf file ands in the middle of 1st edge definition

    <edges>
      <edge id="0" source="0" target="1">
        <attvalues

Could you give me an example how the gexf file should look with dynamic edge weight with timerepresentation='timestamp' ?

@Jonty800
Copy link

I have this same issue when using dynamic weights for both DateTime and Double. Do you know when this is expected to be fixed?

@eduramiba
Copy link
Member

@Jonty800 This should be fixed in 0.9.2 release, and probably as a 0.9.1 update maybe in 1-2 months.

@henisz
Copy link

henisz commented May 3, 2017

Is this fixed? When I try to layout a graph with dynamic edge weights I get the following error message

java.lang.IllegalStateException: The weight is dynamic, call getWeight(timestamp) or getWeight(interval) instead
at org.gephi.graph.impl.EdgeImpl.getWeight(EdgeImpl.java:87)
at org.gephi.layout.plugin.forceAtlas2.ForceAtlas2.goAlgo(ForceAtlas2.java:199)
at org.gephi.layout.LayoutControllerImpl$LayoutRun.run(LayoutControllerImpl.java:184)
[catch] at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.run(LongTaskExecutor.java:274)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

@eduramiba
Copy link
Member

Not fixed yet, sorry, but it's in the list of next issues to fix.

@eduramiba eduramiba added the High label May 3, 2017
@henisz
Copy link

henisz commented May 3, 2017

Is there a way to visualize dynamic networks with time varying edge weights that doesn't crash the software? My data loads fine but as soon as I try to graph, it crashes. Is there any workaround?

@eduramiba
Copy link
Member

@henisz I think the problem here is force atlas 2, not able to handle this. Can you open a separate issue? The workaround now would be not using force atlas 2

@henisz
Copy link

henisz commented May 3, 2017 via email

@Jonty800
Copy link

Jonty800 commented May 3, 2017

@henisz I'm actually going to painfully approach this by having a script which generates multiple gexf files, each representing a window of time, without dynamic edges. Then we can apply the Force Atlas manually to each file.

In my work, I need to produce modularity over time, and this doesn't work with dynamic weights either. So I guess this approach is best for my needs.

@eduramiba
Copy link
Member

@henisz @Jonty800 Seeing this is also a common issue with layouts, I opened a high priority issue for 0.9.2 milestone: #1709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants