D3 partition service module

From WandoraWiki
Jump to: navigation, search

The D3 partition 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 d3partition and the URL of the visualization is

http://127.0.0.1:8898/d3/partition

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. Finally a set of colorSchemes is provided to help visualize the hierarchy's structure.

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.


D3partition 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/partition?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


D3partition 02.png


In a more complex example a recursive [Freebase] query data is used. Extracting data around Claude Monet gives us a hierarchy of influences. The influence node association is not strictly hierarchial since authors and artists may have multiple persons who have influenced them. The navigation aspect of the visualization should nonetheless be meaningful.

We first use the Freebase extractor in File > Extract > Topics > Freebase extractor... with the following options to extract data from Freebase.


D3 partition freebase 01.png


D3 partition freebase 02.png


Influence node is a single association extracted from the data and other hierarchial associations may as well be displayed in the visualization.

After the extraction the influence node hierarchy can be viewed using the URL:

http://127.0.0.1:8898/d3/partition/?rootSI=http://www.freebase.com/en/ovid&assocTypeSI=http://www.freebase.com/influence/influence_node/influenced_by&parentRoleSI=http://www.wandora.org/freebase/target&childRoleSI=http://www.wandora.org/freebase/source


D3partition 03.png


The visualization can be navigated by clicking on a topic expanding it and revealing more of it's child topics.


D3partition 04.png


Appending &colorScheme=n, where n = {1,2,3,4,5,6}, to the query string we can color the topics according to a scheme.


D3partition 05.png
Personal tools