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

[Datalab] Duplicated nodes on import spreadsheet #498

Closed
sheymann opened this Issue Dec 16, 2011 · 1 comment

Comments

Projects
None yet
2 participants
@sheymann
Copy link
Member

sheymann commented Dec 16, 2011

Bug in the Data Lab when loading nodes and edges spreadsheet

Way to reproduce:

  1. Open a new Gephi instance (latest version of Gephi 0.8beta up-to-date on 16/12/11).
  2. Create a new Project.
  3. Go to the DataLab.
  4. Import nodes.csv
  5. Import edges.csv (check to create the missing nodes)
    => Duplicated nodes appear (i.e. two nodes of ID=4)

Note: edges.csv have exactly the same nodes that in nodes.csv.

nodes.csv

Id ModularityClass
1 0
2 1
4 2
37 1
3 3
7 2
8 2
29 4
5 2
18 5
6 6
10 7
11 8
14 9
9 7
12 7
13 9
15 10
16 10
19 10
20 10
21 10
17 10
31 5
22 11
23 12
24 12
25 11
26 11
27 13
33 14
28 13
36 14
30 15
34 16
38 4
32 14
39 16
35 16

edges.csv

Source Target
1 2
2 4
2 37
3 7
4 7
4 8
4 29
5 7
5 8
5 18
6 7
7 8
7 10
7 11
8 14
8 18
9 10
9 12
10 12
10 13
11 13
13 14
14 15
15 16
15 18
15 19
15 20
15 21
16 17
16 18
16 19
16 20
17 19
17 21
18 20
18 29
18 31
19 20
19 21
20 21
20 22
20 31
22 23
22 24
22 25
22 26
23 24
25 26
25 27
25 31
25 33
26 27
26 28
27 28
27 36
29 30
29 34
29 38
30 31
30 34
30 37
31 32
31 33
31 34
32 33
32 36
32 39
33 34
33 36
34 35
34 38
34 39
35 39
36 39
37 38
38 39

@ghost ghost assigned eduramiba Dec 16, 2011

eduramiba added a commit that referenced this issue Dec 17, 2011

@eduramiba

This comment has been minimized.

Copy link
Member

eduramiba commented Dec 17, 2011

Hi,
This was tricky problem with string ids dictionary.
When I built a node with the GraphFactory in data lab, I did it without string id and then set it with graph.setId (instead of creating it already with that id, and this was the problem).

The GraphFactory uses the int id as string id when a string id is not specified so the call to graph.setId was removing from the dictionary the wrong node.
For example, the third node in the nodes.csv has id 4, so when the next node (the fourth) is added, it removed the previous node from the dictionary, which later could not be found by the importer and have its modularity set.

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