Last active
April 26, 2017 10:11
-
-
Save kenwebb/5a1359dcaa16926bad53ec6c48a3657d to your computer and use it in GitHub Desktop.
Gephi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Wed Apr 26 2017 06:10:49 GMT-0400 (EDT)--> | |
<XholonWorkbook> | |
<Notes><![CDATA[ | |
Xholon | |
------ | |
Title: Gephi | |
Description: | |
Url: http://www.primordion.com/Xholon/gwt/ | |
InternalName: 5a1359dcaa16926bad53ec6c48a3657d | |
Keywords: | |
My Notes | |
-------- | |
April 21, 2017 | |
In this workbook, I explore Gephi and its supported file formats especially GEXF. | |
Issues: | |
- node id attribute takes the place of node.id(); id is no longer a function | |
TODO | |
- create a Xholon mechanism with all the GEXF tag names; none of these are used in rexisting Xholon mechanisms | |
- but <attribute/> is used; it will be properly processed if another Java class handles GEXF subtrees | |
- create a Xholon service that can read the GEXF tag names ? | |
- XML reader should recognize the GEXF tag names and process them properly | |
- perhaps delegate to other Java class(es) once the gexf tag name is found | |
To export to Graphviz: | |
--------------------- | |
Graphviz | |
graph_47 | |
{"gvFileExt":".gv","gvGraph":"digraph","layout":"dot","edgeOp":"->","gvCluster":"","shouldShowStateMachineEntities":false,"filter":"--Behavior,Script,edge,edges,attvalue,attributeGEXF,default,attvalues,attributes","nameTemplateNodeId":"^^^^i^","nameTemplateNodeLabel":"R^^^^^","shouldQuoteLabels":true,"shouldShowLinks":true,"shouldShowLinkLabels":false,"shouldSpecifyLayout":false,"maxLabelLen":-1,"shouldColor":true,"defaultColor":"#f0f8ff","shouldSpecifyShape":true,"shape":"ellipse","shouldSpecifySize":true,"size":"10","shouldSpecifyFontname":true,"fontname":"\"Courier New\"","shouldSpecifyArrowhead":true,"arrowhead":"vee","shouldSpecifyStylesheet":true,"stylesheet":"Xholon.css","shouldSpecifyRankdir":true,"rankdir":"LR","shouldDisplayGraph":true,"outputFormat":"svg"} | |
Graphviz code: | |
------------- | |
/* | |
Automatically generated by Xholon version 0.8.1, using org.primordion.ef.Xholon2Graphviz.java | |
Sat Apr 22 09:56:50 GMT-400 2017 1492869410744 | |
model: Gephi | |
www.primordion.com/Xholon | |
To view this file, use Graphviz dot|fdp|neato|twopi|circo|sfdp from http://www.graphviz.org/ | |
For example, to generate an SVG file: | |
dot -Tsvg -O graph_47_1492869410744.gv | |
Alternatively try one of these: | |
dot -Tsvg -O graph_47_1492869410744.gv | |
dot -Tsvg -O -Grankdir=LR graph_47_1492869410744.gv | |
fdp -Tsvg -O graph_47_1492869410744.gv | |
neato -Tsvg -O graph_47_1492869410744.gv | |
circo -Tsvg -O graph_47_1492869410744.gv | |
Or use one of: -Tgif -Tjpg -Tpdf -Tpng -Txdot -Txlib | |
See also: http://hughesbennett.net/Graphviz | |
See also: http://graphviz-dev.appspot.com/ | |
See also: http://www.webgraphviz.com/ | |
See also: http://rise4fun.com/agl/ | |
To repeat this Xholon export: | |
$wnd.xh.xport("Graphviz", $wnd.xh.root().parent().xpath("Chameleon/PhysicalSystem/gexf/graph"), '{"gvFileExt":".gv","gvGraph":"digraph","layout":"dot","edgeOp":"->","gvCluster":"","shouldShowStateMachineEntities":false,"filter":"--Behavior,Script,edge,edges,attvalue,attributeGEXF,default,attvalues,attributes","nameTemplateNodeId":"^^^^i^","nameTemplateNodeLabel":"R^^^^^","shouldQuoteLabels":true,"shouldShowLinks":true,"shouldShowLinkLabels":false,"shouldSpecifyLayout":false,"maxLabelLen":-1,"shouldColor":true,"defaultColor":"#f0f8ff","shouldSpecifyShape":true,"shape":"ellipse","shouldSpecifySize":true,"size":"10","shouldSpecifyFontname":true,"fontname":"\"Courier New\"","shouldSpecifyArrowhead":true,"arrowhead":"vee","shouldSpecifyStylesheet":true,"stylesheet":"Xholon.css","shouldSpecifyRankdir":true,"rankdir":"LR","shouldDisplayGraph":true,"outputFormat":"svg"}'); | |
*/ | |
digraph 47 { | |
graph [label="graph",id="graph",stylesheet="Xholon.css",rankdir=LR,size=10,fontname="Courier New"] | |
node [style=filled,fillcolor="#f0f8ff",shape=ellipse,fontname="Courier New"] | |
edge [arrowhead=vee] | |
subgraph 53 { label="nodes" id="graph/nodes" | |
4556 [label="Bernard Gorcey" id="graph/nodes/node[@roleName='Bernard Gorcey']"] | |
4556 -> 12436; | |
6774 [label="Tenzin Clive Ball" id="graph/nodes/node[@roleName='Tenzin Clive Ball']"] | |
12436 [label="Constance C. Meyer" id="graph/nodes/node[@roleName='Constance C. Meyer']"] | |
12436 -> 8634; | |
subgraph 5885 { label="Pat Comiskey" id="graph/nodes/node[@roleName='Pat Comiskey']" | |
subgraph 62 { label="nodes" id="graph/nodes/node[@roleName='Pat Comiskey']/nodes" | |
123 [label="Ken" id="graph/nodes/node[@roleName='Pat Comiskey']/nodes/node[@roleName='Ken']"] | |
123 -> 124; | |
124 [label="Licorice" id="graph/nodes/node[@roleName='Pat Comiskey']/nodes/node[@roleName='Licorice']"] | |
} | |
} | |
8634 [label="Thomas Kopache" id="graph/nodes/node[@roleName='Thomas Kopache']"] | |
} | |
} | |
References | |
---------- | |
(1) https://gephi.org/ | |
Gephi is the leading visualization and exploration software for all kinds of graphs and networks. Gephi is open-source and free. | |
(2) https://gephi.org/gexf/1.2draft/gexf-12draft-primer.pdf | |
(3) https://gephi.org/gexf/format/data.html | |
(4) https://github.com/graphology/graphology-gexf | |
GEXF parser & writer for graphology. | |
(5) https://github.com/gephi/graphstore | |
GraphStore is an in-memory graph structure implementation written in Java. It is designed to be powerful, efficient and robust. It's powering the Gephi software and supports large graphs in intensive applications. | |
(6) https://www.npmjs.com/package/gexf | |
a JavaScript parser and writer | |
]]></Notes> | |
<params> | |
<param name="MaxPorts" value="2"/> | |
</params> | |
<_-.XholonClass> | |
<PhysicalSystem/> | |
</_-.XholonClass> | |
<xholonClassDetails> | |
</xholonClassDetails> | |
<PhysicalSystem> | |
<!-- a GEXF graph --> | |
<gexf xmlns="http://www.gexf.net/1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3" xsi:schemaLocation="http://www.gexf.net/1.3 http://www.gexf.net/1.3/gexf.xsd" deleteGexfAttrNodes="true" deleteGexfEdgeNodes="true" recurseSubtree="false"> | |
<graph defaultedgetype="directed" mode="static"> | |
<attributes class="node"> | |
<!-- attribute will be converted to attributeGEXF --> | |
<attribute id="0" title="my−text−attribute" type="string"/> | |
<attribute id="1" title="my−int−attribute" type="integer"> | |
<default>23</default> | |
</attribute> | |
<attribute id="2" title="my−bool−attribute" type="boolean"/> | |
</attributes> | |
<nodes> | |
<node id="4556" label="Bernard Gorcey"/> | |
<node id="6774" label="Tenzin Clive Ball"> | |
<attvalues> | |
<attvalue for="0" value="samplevalue"/> | |
<attvalue for="1" value="1831"/> | |
<attvalue for="2" value="true"/> | |
</attvalues> | |
</node> | |
<node id="12436" label="Constance C. Meyer"/> | |
<node id="5885" label="Pat Comiskey"> | |
<!-- a nested graph --> | |
<nodes> | |
<node id="123" label="Ken"/> | |
<node id="124" label="Licorice"/> | |
</nodes> | |
<edges> | |
<edge id="0" source="123" target="124"/> | |
</edges> | |
</node> | |
<node id="8634" label="Thomas Kopache"/> | |
</nodes> | |
<edges> | |
<edge id="0" source="4556" target="12436" weight="2.0"/> | |
<edge id="1" source="12436" target="8634" weight="2.0"/> | |
<edge id="2" source="4556" target="8634" weight="2.0"/> | |
</edges> | |
</graph> | |
</gexf> | |
</PhysicalSystem> | |
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml, | |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<?xml-stylesheet href="Xholon.css" type="text/css"?> | |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | |
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | |
<!-- Generated by graphviz version 2.28.0 (20140111.2315) | |
--> | |
<!-- Title: 47 Pages: 1 --> | |
<svg width="716pt" height="177pt" | |
viewBox="0.00 0.00 716.00 176.80" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<g id="graph" class="graph" transform="scale(1 1) rotate(0) translate(4 172.8)"> | |
<title>47</title> | |
<polygon fill="white" stroke="none" points="-4,4 -4,-172.8 712,-172.8 712,4 -4,4"/> | |
<text text-anchor="middle" x="354" y="-8.2" font-family="Courier New" font-size="14.00">graph</text> | |
<!-- 4556 --> | |
<g id="graph/nodes/node[@roleName='Bernard Gorcey']" class="node"><title>4556</title> | |
<ellipse fill="#f0f8ff" stroke="black" cx="110" cy="-42.8" rx="92.2829" ry="18"/> | |
<text text-anchor="middle" x="110" y="-38.6" font-family="Courier New" font-size="14.00">Bernard Gorcey</text> | |
</g> | |
<!-- 12436 --> | |
<g id="graph/nodes/node[@roleName='Constance C. Meyer']" class="node"><title>12436</title> | |
<ellipse fill="#f0f8ff" stroke="black" cx="372" cy="-42.8" rx="115.129" ry="18"/> | |
<text text-anchor="middle" x="372" y="-38.6" font-family="Courier New" font-size="14.00">Constance C. Meyer</text> | |
</g> | |
<!-- 4556->12436 --> | |
<g id="graph_edge1" class="edge"><title>4556->12436</title> | |
<path fill="none" stroke="black" d="M202.301,-42.8C216.567,-42.8 231.517,-42.8 246.374,-42.8"/> | |
<polygon fill="black" stroke="black" points="256.635,-42.8 246.635,-47.3001 251.635,-42.8 246.635,-42.8001 246.635,-42.8001 246.635,-42.8001 251.635,-42.8 246.635,-38.3001 256.635,-42.8 256.635,-42.8"/> | |
</g> | |
<!-- 8634 --> | |
<g id="graph/nodes/node[@roleName='Thomas Kopache']" class="node"><title>8634</title> | |
<ellipse fill="#f0f8ff" stroke="black" cx="616" cy="-42.8" rx="92.2829" ry="18"/> | |
<text text-anchor="middle" x="616" y="-38.6" font-family="Courier New" font-size="14.00">Thomas Kopache</text> | |
</g> | |
<!-- 12436->8634 --> | |
<g id="graph_edge2" class="edge"><title>12436->8634</title> | |
<path fill="none" stroke="black" d="M487.622,-42.8C496.315,-42.8 505.052,-42.8 513.653,-42.8"/> | |
<polygon fill="black" stroke="black" points="523.676,-42.8 513.676,-47.3001 518.676,-42.8 513.676,-42.8001 513.676,-42.8001 513.676,-42.8001 518.676,-42.8 513.676,-38.3001 523.676,-42.8 523.676,-42.8"/> | |
</g> | |
<!-- 6774 --> | |
<g id="graph/nodes/node[@roleName='Tenzin Clive Ball']" class="node"><title>6774</title> | |
<ellipse fill="#f0f8ff" stroke="black" cx="110" cy="-96.8" rx="109.542" ry="18"/> | |
<text text-anchor="middle" x="110" y="-92.6" font-family="Courier New" font-size="14.00">Tenzin Clive Ball</text> | |
</g> | |
<!-- 123 --> | |
<g id="graph/nodes/node[@roleName='Pat Comiskey']/nodes/node[@roleName='Ken']" class="node"><title>123</title> | |
<ellipse fill="#f0f8ff" stroke="black" cx="110" cy="-150.8" rx="28.3325" ry="18"/> | |
<text text-anchor="middle" x="110" y="-146.6" font-family="Courier New" font-size="14.00">Ken</text> | |
</g> | |
<!-- 124 --> | |
<g id="graph/nodes/node[@roleName='Pat Comiskey']/nodes/node[@roleName='Licorice']" class="node"><title>124</title> | |
<ellipse fill="#f0f8ff" stroke="black" cx="372" cy="-150.8" rx="57.2645" ry="18"/> | |
<text text-anchor="middle" x="372" y="-146.6" font-family="Courier New" font-size="14.00">Licorice</text> | |
</g> | |
<!-- 123->124 --> | |
<g id="graph_edge3" class="edge"><title>123->124</title> | |
<path fill="none" stroke="black" d="M138.825,-150.8C178.022,-150.8 250.7,-150.8 304.339,-150.8"/> | |
<polygon fill="black" stroke="black" points="314.459,-150.8 304.459,-155.3 309.459,-150.8 304.459,-150.8 304.459,-150.8 304.459,-150.8 309.459,-150.8 304.459,-146.3 314.459,-150.8 314.459,-150.8"/> | |
</g> | |
</g> | |
</svg> | |
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient> | |
</XholonWorkbook> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment