Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Commit

Permalink
removed linkurious
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Dec 21, 2017
1 parent 1366a31 commit 6b54d22
Show file tree
Hide file tree
Showing 228 changed files with 94 additions and 53,924 deletions.
47 changes: 47 additions & 0 deletions application-code/thun/analyze/cmfi2netjson.xql
@@ -0,0 +1,47 @@
xquery version "3.0";
declare namespace functx = "http://www.functx.com";
import module namespace xmldb="http://exist-db.org/xquery/xmldb";
import module namespace config="http://www.digital-archiv.at/ns/thun/config" at "../modules/config.xqm";
import module namespace app="http://www.digital-archiv.at/ns/thun/templates" at "../modules/app.xql";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
declare namespace gefx = "http://gexf.net/data/hello-world.gexf";
declare namespace util = "http://exist-db.org/xquery/util";
declare option exist:serialize "method=json media-type=text/javascript";

(:transforms a CMFI document into a JSON which can be processed by visjs into a network graph:)

let $CMFI:= request:get-parameter("CMFI", "")
let $fallback := if ($CMFI eq "") then $config:app-root||'/data/indices/cmfi.xml' else $CMFI
let $source := doc($fallback)
let $result :=
<result>

{

for $corresp in $source//tei:correspDesc[./tei:correspAction[@type='sent'] and ./tei:correspAction[@type='received']]
for $person in $corresp//tei:persName[1]
let $key := data($person/@ref)
group by $key
return
<nodes>
<id>{$key}</id>
<title>{$person[1]/text()}</title>
</nodes>

}

{
for $corresp in $source//tei:correspDesc[./tei:correspAction[@type='sent'] and ./tei:correspAction[@type='received']]
let $sender := $corresp/tei:correspAction[@type='sent']//tei:persName[1]
let $reciver := $corresp/tei:correspAction[@type='received']//tei:persName[1]
let $id := data($corresp/@ref)
return
<edges>
<from>{data($sender/@ref)}</from>
<to>{data($reciver/@ref)}</to>
</edges>
}

</result>

return $result
46 changes: 46 additions & 0 deletions application-code/thun/pages/netvis.html
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<div class="templates:surround?with=templates/page.html&amp;at=content">
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.js"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.css" rel="stylesheet" type="text/css"/>

<style type="text/css">
#visualization {
width: 100%;
height: 600px;
border: 1px solid lightgray;
}
</style>

<div id="visualization">

</div>
<ul class="menu">
<li>Click into the timeline hold<code>ctrl</code> to zoom</li>
<li>Data fetched from<a href="../analyze/cmfi2netjson.xql">../analyze/cmfi2netjson.xql</a>
</li>
</ul>

<script type="text/javascript">
var datasource = "../analyze/cmfi2netjson.xql"
var container = document.getElementById('visualization');
$.getJSON( datasource, function( data ) {
var container = document.getElementById('visualization');
var data = {
nodes: data.nodes,
edges: data.edges
};
var options = {
"edges": {
"smooth": {
"type": "horizontal",
"roundness": 0
}
}
};
var network = new vis.Network(container, data, options);

});

</script>
</div>
216 changes: 0 additions & 216 deletions application-code/thun/pages/personperson-net.html

This file was deleted.

6 changes: 0 additions & 6 deletions application-code/thun/resources/js/linkurious/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions application-code/thun/resources/js/linkurious/.npmignore

This file was deleted.

3 changes: 0 additions & 3 deletions application-code/thun/resources/js/linkurious/.travis.yml

This file was deleted.

0 comments on commit 6b54d22

Please sign in to comment.