D3 tree service module

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
The D3 tree module uses the [https://github.com/mbostock/d3/wiki/Tree-Layout D3 partition layout] to visualize hierarchial topic structures in Wandora. It uses the open source JavaScript visualization library [http://d3js.org/ D3.js]. The service module's alias in Wandora is '''d3tree''' and the URL of the visualization is  
 
The D3 tree module uses the [https://github.com/mbostock/d3/wiki/Tree-Layout D3 partition layout] to visualize hierarchial topic structures in Wandora. It uses the open source JavaScript visualization library [http://d3js.org/ D3.js]. The service module's alias in Wandora is '''d3tree''' and the URL of the visualization is  
  
  http://127.0.0.1:8898/d3tree
+
  http://127.0.0.1:8898/d3/tree
  
 
The visualization facilitates different hierarchies with HTTP parameters used to specify the hierarchy's root topic, child-parent-association and respective child and parent roles in the association. By default the depth of recursion through the hierarchy is limited to 5 recursions but may also be overridden with a HTTP parameter.
 
The visualization facilitates different hierarchies with HTTP parameters used to specify the hierarchy's root topic, child-parent-association and respective child and parent roles in the association. By default the depth of recursion through the hierarchy is limited to 5 recursions but may also be overridden with a HTTP parameter.
Line 17: Line 17:
 
A larger set of topics shown here is achieved by using the [[Tree graph generator]] and specifying the following query string.
 
A larger set of topics shown here is achieved by using the [[Tree graph generator]] and specifying the following query string.
  
  http://127.0.0.1:8898/d3tree?rootSI=http%3A//www.wandora.org/topic/root&assocTypeSI=http%3A//www.wandora.org/topic/associationType&childRoleSI=http%3A//www.wandora.org/topic/child&parentRoleSI=http%3A//www.wandora.org/topic/parent
+
  http://127.0.0.1:8898/d3/tree?rootSI=http%3A//www.wandora.org/topic/root&assocTypeSI=http%3A//www.wandora.org/topic/associationType&childRoleSI=http%3A//www.wandora.org/topic/child&parentRoleSI=http%3A//www.wandora.org/topic/parent
  
 
where
 
where
Line 38: Line 38:
 
The following query string is used to visualize four generations of George I's descendants
 
The following query string is used to visualize four generations of George I's descendants
  
  http://127.0.0.1:8898/d3tree/?depth=4&rootSI=http%3A//www.wandora.org/gedcom/I341&assocTypeSI=http%3A//www.wandora.org/gedcom/schema/childparent&childRoleSI=http%3A//www.wandora.org/gedcom/schema/child&parentRoleSI=http%3A//www.wandora.org/gedcom/schema/parent
+
  http://127.0.0.1:8898/d3/tree/?depth=4&rootSI=http%3A//www.wandora.org/gedcom/I341&assocTypeSI=http%3A//www.wandora.org/gedcom/schema/childparent&childRoleSI=http%3A//www.wandora.org/gedcom/schema/child&parentRoleSI=http%3A//www.wandora.org/gedcom/schema/parent
  
 
where  
 
where  
Line 54: Line 54:
 
Reversing the child and parent roles and icreasing depth we get in turn 7 generations of George I's ancestors
 
Reversing the child and parent roles and icreasing depth we get in turn 7 generations of George I's ancestors
  
  http://127.0.0.1:8898/d3tree/?depth=4&rootSI=http%3A//www.wandora.org/gedcom/I341&assocTypeSI=http%3A//www.wandora.org/gedcom/schema/childparent&childRoleSI=http%3A//www.wandora.org/gedcom/schema/parent&parentRoleSI=http%3A//www.wandora.org/gedcom/schema/child
+
  http://127.0.0.1:8898/d3/tree/?depth=4&rootSI=http%3A//www.wandora.org/gedcom/I341&assocTypeSI=http%3A//www.wandora.org/gedcom/schema/childparent&childRoleSI=http%3A//www.wandora.org/gedcom/schema/parent&parentRoleSI=http%3A//www.wandora.org/gedcom/schema/child
  
  
 
[[Image:d3_tree_05.png|center]]
 
[[Image:d3_tree_05.png|center]]

Latest revision as of 12:52, 16 May 2014

The D3 tree module uses the D3 partition layout to visualize hierarchial topic structures in Wandora. It uses the open source JavaScript visualization library D3.js. The service module's alias in Wandora is d3tree and the URL of the visualization is

http://127.0.0.1:8898/d3/tree

The visualization facilitates different hierarchies with HTTP parameters used to specify the hierarchy's root topic, child-parent-association and respective child and parent roles in the association. By default the depth of recursion through the hierarchy is limited to 5 recursions but may also be overridden with a HTTP parameter.

A complete description of the parameters is provided on the visualization page and an example of their use follows below.

Note that as with D3 the browser support of D3 visualizations in Wandora is limited to IE9+ and up to date versions of Firefox, Chrome (+Chromium), Safari and Opera.

By default the visualization shows a hierarchy where Wandora Class is the root topic, the parent role is superclass and the child role subclass in the superclass-subclass association. No topics need to be added to Wandora to view this hierarchy since the aforementioned topics are added to Wandora on startup.


D3 tree 01.png


A larger set of topics shown here is achieved by using the Tree graph generator and specifying the following query string.

http://127.0.0.1:8898/d3/tree?rootSI=http%3A//www.wandora.org/topic/root&assocTypeSI=http%3A//www.wandora.org/topic/associationType&childRoleSI=http%3A//www.wandora.org/topic/child&parentRoleSI=http%3A//www.wandora.org/topic/parent

where


D3 tree 02.png


In a more complex example a data from the European royal families topicmap is used. A Query topic map that creates child-parent associations has been added to the layer structure in the project file in order to visualize hierarchial family relations.


D3 tree 03.png


The following query string is used to visualize four generations of George I's descendants

http://127.0.0.1:8898/d3/tree/?depth=4&rootSI=http%3A//www.wandora.org/gedcom/I341&assocTypeSI=http%3A//www.wandora.org/gedcom/schema/childparent&childRoleSI=http%3A//www.wandora.org/gedcom/schema/child&parentRoleSI=http%3A//www.wandora.org/gedcom/schema/parent

where


D3 tree 04.png


Reversing the child and parent roles and icreasing depth we get in turn 7 generations of George I's ancestors

http://127.0.0.1:8898/d3/tree/?depth=4&rootSI=http%3A//www.wandora.org/gedcom/I341&assocTypeSI=http%3A//www.wandora.org/gedcom/schema/childparent&childRoleSI=http%3A//www.wandora.org/gedcom/schema/parent&parentRoleSI=http%3A//www.wandora.org/gedcom/schema/child


D3 tree 05.png
Personal tools