PageRanking in gulpfile and hasCredential instead of attendee

This commit is contained in:
Ruben van de Ven 2020-03-24 21:27:14 +01:00
parent 4045f05121
commit 88ab656328
13 changed files with 1624 additions and 1462 deletions

View File

@ -2,11 +2,18 @@
RewriteEngine On
RewriteRule "^2018/data-flaneur$" "index.html"
RewriteRule "^2018/digital-cultures$" "index.html"
RewriteRule "^2020/acts-of-collection-and-omission$" "index.html"
RewriteRule "^article/choose-how-you-feel-you-have-seven-options$" "index.html"
RewriteRule "^assets/video/guerilla_project.mp4$" "index.html"
RewriteRule "^choose-how-you-feel-you-have-seven-options$" "index.html"
RewriteRule "^degree/avm$" "index.html"
RewriteRule "^degree/cddc$" "index.html"
RewriteRule "^degree/mechanical-engineering$" "index.html"
RewriteRule "^degree/media-design$" "index.html"
RewriteRule "^emotionhero$" "index.html"
RewriteRule "^event/2018/yama-ichi$" "index.html"
RewriteRule "^event/2019/ccu-presentation$" "index.html"
RewriteRule "^event/cqrrelations$" "index.html"
RewriteRule "^event/creativity-and-cognition$" "index.html"
RewriteRule "^exercises-in-overfitting$" "index.html"
RewriteRule "^exercises-in-overfitting/image/1$" "index.html"
@ -43,6 +50,7 @@ RewriteRule "^mvp3$" "index.html"
RewriteRule "^mvp3/image/1$" "index.html"
RewriteRule "^mvps$" "index.html"
RewriteRule "^organisation/ccu$" "index.html"
RewriteRule "^organisation/constant$" "index.html"
RewriteRule "^organisation/nsvp$" "index.html"
RewriteRule "^organisation/setup$" "index.html"
RewriteRule "^organisation/v2_$" "index.html"
@ -53,9 +61,11 @@ RewriteRule "^person/joseph-huot$" "index.html"
RewriteRule "^person/merijn-van-moll$" "index.html"
RewriteRule "^person/mikel-folgerts$" "index.html"
RewriteRule "^person/ward-goes$" "index.html"
RewriteRule "^pillow-talk$" "index.html"
RewriteRule "^place/in4art$" "index.html"
RewriteRule "^place/q21$" "index.html"
RewriteRule "^plottingdata$" "index.html"
RewriteRule "^residency/q21$" "index.html"
RewriteRule "^residency/summer-sessions$" "index.html"
RewriteRule "^samawati/video$" "index.html"
RewriteRule "^spectacular-spectator-mood-meter$" "index.html"
@ -73,6 +83,7 @@ RewriteRule "^@type/Event$" "index.html"
RewriteRule "^@type/Report$" "index.html"
RewriteRule "^@type/VideoObject$" "index.html"
RewriteRule "^@type/MediaObject$" "index.html"
RewriteRule "^@type/EducationalOccupationalCredential$" "index.html"
RewriteRule "^@type/ExhibitionEvent$" "index.html"
RewriteRule "^@type/ImageObject$" "index.html"
RewriteRule "^@type/Festival$" "index.html"
@ -83,5 +94,6 @@ RewriteRule "^@type/Person$" "index.html"
RewriteRule "^@type/EventVenue$" "index.html"
RewriteRule "^@type/Museum$" "index.html"
RewriteRule "^@type/PerformingGroup$" "index.html"
RewriteRule "^@type/VisualArtsEvent$" "index.html"
RewriteRule "^@type/CollegeOrUniversity$" "index.html"
RewriteRule "^@type/WebSite$" "index.html"

View File

@ -6,7 +6,7 @@ body {
font-family: "DDINRegular", helvetica, sans-serif;
font-weight: light;
height: 100vh;
background: black;
background: #222;
font-size: 12pt; }
a, a:link, a:visited {
@ -162,7 +162,7 @@ text {
width: 0; }
#nodeDetails .nodeType {
font-size: 80%;
text-transform: uppercase;
font-variant-caps: small-caps;
color: #999;
margin-left: 10px; }
#nodeDetails .nodeType:hover {
@ -201,7 +201,8 @@ text {
width: 170px;
font-weight: bold;
min-height: 25px;
clear: both; }
clear: both;
word-wrap: anywhere; }
#nodeDetails dd {
min-height: 30px;
margin-top: 5px; }

View File

@ -45,7 +45,7 @@ function getNodeYear(n) {
return n['https://schema.org/datePublished'].substr(0, 4);
}
if (typeof n['https://schema.org/startDate'] !== 'undefined') {
console.log(n['https://schema.org/startDate']);
// console.log(n['https://schema.org/startDate']);
return n['https://schema.org/startDate'].substr(0, 4);
}
if (typeof n['https://schema.org/endDate'] !== 'undefined') {
@ -125,10 +125,24 @@ var graph;
var nodeMap = {};
var linkMap = {};
var breadcrumbs = {};
var weights = {};
// load the flattened jsonld file
var requestPromise = fetch('/assets/js/rubenvandeven.jsonld').then(function (r) {
return r.json();
}).then(function (data) {
});
var rankingPromise = fetch('/assets/js/ranking.json').then(function (r) {
return r.json();
});
Promise.all([requestPromise, rankingPromise]).then(function (values) {
if (values[0].hasOwnProperty('@graph')) {
data = values[0];
weights = values[1];
} else {
data = values[1];
weights = values[0];
}
graph = jsonLdToGraph(data['@graph']);
// create a map of nodes by id.
for (var i in graph.nodes) {
@ -199,8 +213,7 @@ var firstNodeId = "https://rubenvandeven.com/";
function getSizeForNode(node) {
if (node.hasOwnProperty('https://schema.org/thumbnailUrl')) return nodeSize;
//if(weights[node['@id']])
// return nodeSize * weights[node['@id']];
if (weights[node['@id']]) return nodeSize * weights[node['@id']];
if (node['@id'] == firstNodeId) return nodeSize * 1.2;
// everynode has at least one link. these should equal 1
return nodeSize * (.7 + Math.min(20, linkMap[node['@id']].length) / 40);
@ -534,7 +547,7 @@ function startGraph(graph) {
deselectNode();
if (updateHistory) {
// TODO: working
console.log(types[0], getDisplayAttr(types[0]), types.map(getDisplayAttr));
// console.log(types[0], getDisplayAttr(types[0]),types.map(getDisplayAttr));
history.pushState({ types: types }, "", "/@type/" + types.map(getDisplayAttr).join("+"));
} else {
history.replaceState({ types: types }, "", "/@type/" + types.map(getDisplayAttr).join("+"));
@ -729,11 +742,17 @@ function startGraph(graph) {
}
}
// relationships / links in <dl>
// relationships / links incomming <dl>
for (var _attr in relDown) {
var attrEl = document.createElement("dt");
attrEl.innerHTML = getDisplayAttr(_attr);
relsEl.appendChild(attrEl);
// highest pagerank first:
relDown[_attr].sort(function (a, b) {
return weights[b['@id']] - weights[a['@id']];
});
for (var _i2 in relDown[_attr]) {
var rel = relDown[_attr][_i2];
relsEl.appendChild(createRelationshipEl(rel));
@ -752,10 +771,17 @@ function startGraph(graph) {
}
}
// relationships / links outgoing <dl>
for (var _attr2 in relUp) {
var _attrEl = document.createElement("dt");
_attrEl.innerHTML = getDisplayAttr(_attr2);
relsEl.appendChild(_attrEl);
// highest pagerank first:
relUp[_attr2].sort(function (a, b) {
return weights[b['@id']] - weights[a['@id']];
});
for (var _i3 in relUp[_attr2]) {
var _rel = relUp[_attr2][_i3];
relsEl.appendChild(createRelationshipEl(_rel, _i3));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
assets/js/ranking.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,6 +10,7 @@ var browserSync = require('browser-sync');
var jsonld = require('jsonld');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var exec = require('child_process').exec;
var through = require('through2')
@ -106,21 +107,39 @@ function createHtaccessFromFlattenedJsonld(flattened) {
require('fs').writeFileSync('.htaccess', contentLines.join("\n")+"\n"+Object.values(typeLines).join("\n") + "\n");
}
gulp.task('jsonld', function(){
function createPagerankFromFlattenedJsonld(done){
exec('ranking/venv/bin/python ranking/jsonld_ranking.py -i assets/js/rubenvandeven.jsonld -o assets/js/ranking.json', function (err, stdout, stderr) {
if(stdout)
console.log(stdout);
if(stderr)
console.error(stderr);
done(err);
});
}
gulp.task('flattenJsonld', function() {
return gulp.src(paths.data.src)
.pipe(through.obj(function (file, enc, callback) {
let data = JSON.parse(file.contents.toString(enc));
var transformedFile = file.clone();
// console.log(data);
jsonld.flatten(data, {}, (err, flattened)=> {
if(err) {
console.error(err);
}
transformedFile.contents = Buffer.from(JSON.stringify(flattened), enc);
createHtaccessFromFlattenedJsonld(flattened);
callback(null, transformedFile)
});
}))
.pipe(gulp.dest(paths.data.dest));
.pipe(gulp.dest(paths.data.dest))
});
gulp.task('jsonld', gulp.series(
'flattenJsonld',
createPagerankFromFlattenedJsonld
));
var watchStylesAndScripts = function() {
gulp.watch(paths.styles.src, gulp.series('styles'));
gulp.watch(paths.scripts.src,gulp.series('scripts', reload));

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,20 @@
from pyld import jsonld
import json
import PageRank.pagerank as pagerank
import argparse
parser = argparse.ArgumentParser(description='Apply pagerank to the (flattened) JSONLD file')
parser.add_argument('--jsonld', '-i', metavar='FILENAME.JSONLD', type=str,
required=True,
help='Input filename, make sure to use the flattened JSONLD (in our case from the \'assets\' folder)')
parser.add_argument('--output', '-o', type=str,
default=None, metavar='FILENAME.JSON',
help='Optional output filename for the resulting JSON')
args = parser.parse_args()
# use flattened jsonld
with open('../assets/js/rubenvandeven.jsonld', 'r') as fp:
with open(args.jsonld, 'r') as fp:
contents = json.load(fp)['@graph']
linksPerItem = {}
@ -17,6 +27,7 @@ def addCount(fromId, toId, weight):
linksPerItem[fromId][toId] += weight
def addLink(fromId, toId, weight = 1):
# Add link both ways: from + to.
addCount(fromId, toId, weight)
addCount(toId, fromId, weight)
@ -49,7 +60,13 @@ targetMax = 1.5
values = pagerank.powerIteration(linksPerItem)
normalised = targetMin + (values - min(values)) * (targetMax-targetMin)/max(values)
if args.output is None:
print(json.dumps(dict(normalised)))
else:
with open(args.output, 'w') as fp:
json.dump(dict(normalised), fp)
#
# factor = 1 / min(values)
# print(factor)

View File

@ -7,9 +7,11 @@
"@type": "WebSite",
"@id": "r:/www",
"url": "https://rubenvandeven.com",
"s:seeAlso": [ "https://rubenvandeven.com/rubenvandeven.jsonld", "https://git.rubenvandeven.com/r/portfolio"],
"author":
{
"s:seeAlso": [
"https://rubenvandeven.com/rubenvandeven.jsonld",
"https://git.rubenvandeven.com/r/portfolio"
],
"author": {
"@id": "r:/",
"@type": "Person",
"name": "Ruben van de Ven",
@ -23,13 +25,26 @@
"@type": "PerformingGroup",
"name": "Plotting Data: dramatisation as tactic",
"url": "http://plottingd.at/a",
"foundingDate": "2018",
"description": "A research into <em>Data Dramatisation</em> as a tactic to make data visualisations more transparent in their underlying procedures of data collection. We advocate a form of data literacy that is not so much focussed on programming skill, but rather one that brings an understanding of data infrastructures: allowing for restistance against data driven governance.",
"temporalCoverage": "2018-2020",
"description": "A research into <em>Data Dramatisation</em> as a tactic to make data visualisations more transparent in their underlying procedures of data collection. We advocate a form of data literacy that is not so much focussed on programming skill, but rather one that brings an understanding of data infrastructures: allowing for restistance against data driven governance.\n\nWith support of the Creative Industries Fund NL.",
"member": [
{"@id": "r:/person/cristina-cochior"}
{
"@id": "r:/person/cristina-cochior"
}
],
"@reverse": {
"about": [
{
"@id": "r:/2020/acts-of-collection-and-omission",
"@type": "Event",
"name": "Acts of Collection and Omission",
"url": "https://digitalculturesconference.org/",
"startDate": "2020-03-11 19:30",
"endDate": "2020-03-11 22:00",
"organizer": "Centre for Digital Cultures & Institute for Culture and Society",
"description": "The event will host three rounds of conversations that will introduce various datasets and artistic ways of interfacing them.\n\nAlgorithmic models learn to distinguish patterns and make predictions by attempting to imitate existing structures in vast collections of data. In the process of creating these datasets, conflict and ambiguity are omitted in favour of turning the world into its computable double. How do we bring forth narratives that make other interpretations possible?\n\nPlotting Data was a series of workshops held by Cristina Cochior & Ruben van de Ven in 2019, which explored the biases and tensions within datasets that underlie systems for automated decision making. Discussions, presentations and performances fed into the creation of digital interfaces that emphasise the inherently performative characteristics of datasets.\n\nThis final event marks the end of this project and the release of the Acts of Collection and Omission digital publication. Two tables will be hosted by invited artists Julie Boschat Thorez & Sami Hammana and Nicolas Malevé, while the third table will give an overview of the publication.",
"location": "Framer Framed & Netwerk Democratie, Amsterdam"
},
{
"@id": "r:/2018/digital-cultures",
"@type": "Event",
@ -101,53 +116,6 @@
}
}
],
"attendee": [
{
"@id": "r:/residency/summer-sessions",
"@type": "VisualArtsEvent",
"name": "Residency: Summer Sessions 2016",
"url": [
"http://summersessions.net/17-projects/projects-2016/55-emotion-hero",
"http://www.arquivo237.com/en/Passado/manipulation-emotion-hero-2/"
],
"description": "I was part of the Summer Sessions Network for Talent Development in a co-production of Arquivo 237 and V2_ Lab for the Unstable Media, with support of the Creative Industries Fund NL.",
"startDate": "2016-09",
"endDate": "2016-10",
"about": {
"@id": "r:/emotionhero"
}
},
{
"@id": "r:/residency/q21",
"@type": "VisualArtsEvent",
"name": "Residency: Q21",
"startDate": "2017-01",
"endDate": "2017-02",
"url": "https://www.mqw.at/institutionen/q21/artists-in-residence/2016/ruben-van-de-ven/",
"@reverse": {
"subEvent": {
"@id": "r:/exhibition/mood_swings"
}
},
"location": {
"@id": "r:/place/q21"
}
},
{
"@id": "r:/event/cqrrelations",
"@type": "Event",
"name": "Cqrrelations Worksession",
"url": "http://cqrrelations.constantvzw.org/",
"startDate": "2015-01-18",
"endDate": "2015-01-23",
"organizer": {
"@id": "r:/organisation/constant",
"url": "http://constantvzw.org",
"@type": "Organization",
"name": "Constant"
}
}
],
"organiser": [
{
"@type": "EducationEvent",
@ -183,27 +151,27 @@
{
"@id": "r:/guest-worker/image/1",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/guest_worker01.jpg",
"thumbnailUrl": "/assets\/thumb\/guest_worker01.jpg"
"contentUrl": "/assets/image/guest_worker01.jpg",
"thumbnailUrl": "/assets/thumb/guest_worker01.jpg"
},
{
"@id": "r:/guest-worker/image/2",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/guest_worker02.jpg",
"thumbnailUrl": "/assets\/thumb\/guest_worker02.jpg"
"contentUrl": "/assets/image/guest_worker02.jpg",
"thumbnailUrl": "/assets/thumb/guest_worker02.jpg"
},
{
"@id": "r:/guest-worker/image/3",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/guest_worker03.jpg",
"thumbnailUrl": "/assets\/thumb\/guest_worker03.jpg"
"contentUrl": "/assets/image/guest_worker03.jpg",
"thumbnailUrl": "/assets/thumb/guest_worker03.jpg"
}
],
"video": [
{
"@id": "r:/guest-worker/video/outcome",
"@type": "VideoObject",
"thumbnailUrl": "/assets\/thumb\/guest_worker04.jpg",
"thumbnailUrl": "/assets/thumb/guest_worker04.jpg",
"contentUrl": "http://works.rubenvandeven.com/2019-guest_worker/guestworker-without-credits.mp4",
"encodingFormat": "video/mp4",
"videoFrameSize": "1920x1080"
@ -211,7 +179,7 @@
{
"@id": "r:/guest-worker/video/process",
"@type": "VideoObject",
"thumbnailUrl": "/assets\/thumb\/guest_worker05.jpg",
"thumbnailUrl": "/assets/thumb/guest_worker05.jpg",
"contentUrl": "http://works.rubenvandeven.com/2019-guest_worker/GuestWorker.mp4",
"encodingFormat": "video/mp4",
"videoFrameSize": "1920x1080"
@ -230,7 +198,9 @@
"name": "Beyond Human",
"url": "https://www.beyondhuman.nl/event/setup/",
"organizer": [
{"@id": "r:/organisation/setup"},
{
"@id": "r:/organisation/setup"
},
{
"@id": "r:/organisation/nsvp",
"@type": "Organization",
@ -291,7 +261,9 @@
"@type": "Event",
"name": "Presentation @ Creative Coding Utrecht",
"startDate": "2019-10-31",
"organizer": {"@id": "r:/organisation/ccu"},
"organizer": {
"@id": "r:/organisation/ccu"
},
"location": "Nijverheidsloods, Utrecht"
}
],
@ -311,23 +283,27 @@
"name": "Exercises in overfitting",
"dateCreated": "2019",
"description": "I taught a computer how to write the name of my son. The progression of this machine learning processes is materialised with a pen plotter.",
"s:seeAlso": [ "https://gitlab.com/rubenvandeven/diede"],
"s:seeAlso": [
"https://gitlab.com/rubenvandeven/diede"
],
"image": [
{
"@id": "r:/exercises-in-overfitting/image/2",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/exercises-in-overfitting2.jpg",
"thumbnailUrl": "/assets\/thumb\/exercises-in-overfitting2.jpg"
"contentUrl": "/assets/image/exercises-in-overfitting2.jpg",
"thumbnailUrl": "/assets/thumb/exercises-in-overfitting2.jpg"
},
{
"@id": "r:/exercises-in-overfitting/image/1",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/exercises-in-overfitting1.jpg",
"thumbnailUrl": "/assets\/thumb\/exercises-in-overfitting1.jpg"
"contentUrl": "/assets/image/exercises-in-overfitting1.jpg",
"thumbnailUrl": "/assets/thumb/exercises-in-overfitting1.jpg"
}
],
"@reverse": {
"workFeatured": {"@id": "r:/event/2019/ccu-presentation"}
"workFeatured": {
"@id": "r:/event/2019/ccu-presentation"
}
}
},
{
@ -340,8 +316,8 @@
{
"@id": "r:/heartbeat/image/1",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/data-double-black-market.jpg",
"thumbnailUrl": "/assets\/thumb\/data-double-black-market.jpg"
"contentUrl": "/assets/image/data-double-black-market.jpg",
"thumbnailUrl": "/assets/thumb/data-double-black-market.jpg"
}
],
"@reverse": {
@ -349,7 +325,9 @@
"@id": "r:/event/2018/yama-ichi",
"@type": "ExhibitionEvent",
"name": "Yama Ichi Black Market",
"location": {"@id":"r:/venue/tivoli"}
"location": {
"@id": "r:/venue/tivoli"
}
}
}
},
@ -397,14 +375,14 @@
{
"@id": "r:/sustaining-gazes/image/1",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/sustaining-gazes-2.jpg",
"thumbnailUrl": "/assets\/thumb\/sustaining-gazes-2.jpg"
"contentUrl": "/assets/image/sustaining-gazes-2.jpg",
"thumbnailUrl": "/assets/thumb/sustaining-gazes-2.jpg"
},
{
"@id": "r:/sustaining-gazes/image/2",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/sustaining-gazes-1.jpg",
"thumbnailUrl": "/assets\/thumb\/sustaining-gazes-1.jpg"
"contentUrl": "/assets/image/sustaining-gazes-1.jpg",
"thumbnailUrl": "/assets/thumb/sustaining-gazes-1.jpg"
}
]
},
@ -463,20 +441,20 @@
{
"@id": "r:/mvp1/image/1",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/mvp1-1.jpg",
"thumbnailUrl": "/assets\/thumb\/mvp1-1.jpg"
"contentUrl": "/assets/image/mvp1-1.jpg",
"thumbnailUrl": "/assets/thumb/mvp1-1.jpg"
},
{
"@id": "r:/mvp1/image/2",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/mvp1-2.jpg",
"thumbnailUrl": "/assets\/thumb\/mvp1-2.jpg"
"contentUrl": "/assets/image/mvp1-2.jpg",
"thumbnailUrl": "/assets/thumb/mvp1-2.jpg"
},
{
"@id": "r:/mvp1/image/3",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/mvp1-4.jpg",
"thumbnailUrl": "/assets\/thumb\/mvp1-4.jpg"
"contentUrl": "/assets/image/mvp1-4.jpg",
"thumbnailUrl": "/assets/thumb/mvp1-4.jpg"
}
]
},
@ -496,8 +474,7 @@
"url": "http://www.joseph-huot.com/"
},
"@reverse": {
"workFeatured":
{
"workFeatured": {
"@id": "r:/exhibition/kickstart"
}
},
@ -505,20 +482,20 @@
{
"@id": "r:/mvp2/image/1",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/mvp2-01.jpg",
"thumbnailUrl": "/assets\/thumb\/mvp2-01.jpg"
"contentUrl": "/assets/image/mvp2-01.jpg",
"thumbnailUrl": "/assets/thumb/mvp2-01.jpg"
},
{
"@id": "r:/mvp2/image/2",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/mvp2-02.jpg",
"thumbnailUrl": "/assets\/thumb\/mvp2-02.jpg"
"contentUrl": "/assets/image/mvp2-02.jpg",
"thumbnailUrl": "/assets/thumb/mvp2-02.jpg"
},
{
"@id": "r:/mvp2/image/3",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/mvp2-5.jpg",
"thumbnailUrl": "/assets\/thumb\/mvp2-5.jpg"
"contentUrl": "/assets/image/mvp2-5.jpg",
"thumbnailUrl": "/assets/thumb/mvp2-5.jpg"
}
]
},
@ -538,8 +515,7 @@
"url": "https://www.instagram.com/mikelfolgerts/"
},
"@reverse": {
"workFeatured":
{
"workFeatured": {
"@id": "r:/exhibition/kickstart"
}
},
@ -547,8 +523,8 @@
{
"@id": "r:/mvp3/image/1",
"@type": "ImageObject",
"contentUrl": "/assets\/image\/mvp3-1.jpg",
"thumbnailUrl": "/assets\/thumb\/mvp3-1.jpg"
"contentUrl": "/assets/image/mvp3-1.jpg",
"thumbnailUrl": "/assets/thumb/mvp3-1.jpg"
}
]
}
@ -580,23 +556,23 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/moodmeter1-1.jpg",
"thumbnailUrl": "/assets\/thumb\/moodmeter1-1.jpg"
"contentUrl": "/assets/image/moodmeter1-1.jpg",
"thumbnailUrl": "/assets/thumb/moodmeter1-1.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/moodmeter2.jpg",
"thumbnailUrl": "/assets\/thumb\/moodmeter2.jpg"
"contentUrl": "/assets/image/moodmeter2.jpg",
"thumbnailUrl": "/assets/thumb/moodmeter2.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/moodmeter3.jpg",
"thumbnailUrl": "/assets\/thumb\/moodmeter3.jpg"
"contentUrl": "/assets/image/moodmeter3.jpg",
"thumbnailUrl": "/assets/thumb/moodmeter3.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/moodmeter4.jpg",
"thumbnailUrl": "/assets\/thumb\/moodmeter4.jpg"
"contentUrl": "/assets/image/moodmeter4.jpg",
"thumbnailUrl": "/assets/thumb/moodmeter4.jpg"
}
]
},
@ -605,7 +581,7 @@
"@type": "MediaObject",
"dateCreated": "2016",
"name": "Emotion Hero",
"description": "Emotion recognition software is being used both as a tool for \u2018objective\u2019 measurements as well as a tool for training one\u2019s facial expressions, eg. for job interviews. Emotion Hero is a literal translation of the paradoxical relation between these applications of the technology.\n\nEmotion Hero is a two-part artwork. On the one hand is a video-game that is freely downloadable for everybody with an Android device (see <a href=\"https://play.google.com\/store\/apps\/details?id=com.rubenvandeven.emotion_hero\">Google Play<\/a>). Inspired by Guitar Hero, the user scores points by following given cues. It provides detailed feedback on the mechanics of the face (eg. \u201cYou showed on 10% Joy when you had to show 100%, smile 99.32% more.\u201d), revealing that rather than being a window into the brain, the face is a controllable surface.\n\nThe second part is a projection that shows the aggregated scores of the game. In order to substantiate their discourse, companies in facial expression measurement employ a huge amount of data collection and processing. The results are displayed in a fixed grid, recalling historical practices that, trough extensive measurement and administration, also aimed to delineate something which is conceptually undelineated: think of Duchenne de Boulogne, Lombroso, and Charcot.\n\nEmotion Hero is a playful invitation to open up the box of expression analysis to reveal the assumptions that underlie this technology.\nThe game's emotional intelligence is powered by Affectiva (I was also <a href=\"http://blog.affectiva.com\/sdk-on-the-spot-emotion-hero-app-encourages-play-with-facial-expressions\">interviewed<\/a> by them).",
"description": "Emotion recognition software is being used both as a tool for objective measurements as well as a tool for training ones facial expressions, eg. for job interviews. Emotion Hero is a literal translation of the paradoxical relation between these applications of the technology.\n\nEmotion Hero is a two-part artwork. On the one hand is a video-game that is freely downloadable for everybody with an Android device (see <a href=\"https://play.google.com/store/apps/details?id=com.rubenvandeven.emotion_hero\">Google Play</a>). Inspired by Guitar Hero, the user scores points by following given cues. It provides detailed feedback on the mechanics of the face (eg. “You showed on 10% Joy when you had to show 100%, smile 99.32% more.”), revealing that rather than being a window into the brain, the face is a controllable surface.\n\nThe second part is a projection that shows the aggregated scores of the game. In order to substantiate their discourse, companies in facial expression measurement employ a huge amount of data collection and processing. The results are displayed in a fixed grid, recalling historical practices that, trough extensive measurement and administration, also aimed to delineate something which is conceptually undelineated: think of Duchenne de Boulogne, Lombroso, and Charcot.\n\nEmotion Hero is a playful invitation to open up the box of expression analysis to reveal the assumptions that underlie this technology.\nThe game's emotional intelligence is powered by Affectiva (I was also <a href=\"http://blog.affectiva.com/sdk-on-the-spot-emotion-hero-app-encourages-play-with-facial-expressions\">interviewed</a> by them).",
"url": "https://emotionhero.com",
"@reverse": {
"workFeatured": [
@ -632,8 +608,8 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/eh-shenzen.jpg",
"thumbnailUrl": "/assets\/thumb\/eh-shenzen.jpg"
"contentUrl": "/assets/image/eh-shenzen.jpg",
"thumbnailUrl": "/assets/thumb/eh-shenzen.jpg"
}
]
},
@ -668,8 +644,10 @@
{
"@type": "ExhibitionEvent",
"name": "Plan D",
"url": ["http://2017.pland.hr/",
"http://2017.pland.hr/vijesti/dodijeljena-nagrada-i-pocasne-diplome-festivala-plan-d/"],
"url": [
"http://2017.pland.hr/",
"http://2017.pland.hr/vijesti/dodijeljena-nagrada-i-pocasne-diplome-festivala-plan-d/"
],
"location": "Zagreb",
"startDate": "2017-10",
"endDate": "2018-10",
@ -687,7 +665,9 @@
},
"startDate": "2017-09",
"endDate": "2017-09",
"organiser": { "@id":"r:/organisation/v2_" },
"organiser": {
"@id": "r:/organisation/v2_"
},
"funded": "Creative Industries Fund",
"workFeatured": []
},
@ -695,7 +675,10 @@
"@id": "r:/event/creativity-and-cognition",
"@type": "ExhibitionEvent",
"name": "Microbites of Creativity",
"url": ["http://microbites.me/","http://cc.acm.org/2017/microbites/?ArtworksCC2017/"],
"url": [
"http://microbites.me/",
"http://cc.acm.org/2017/microbites/?ArtworksCC2017/"
],
"organiser": "ACM Creativity & Cognition",
"location": {
"@type": "Museum",
@ -766,18 +749,19 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/emotionhero1-2.jpg",
"thumbnailUrl": "/assets\/thumb\/emotionhero1-2.jpg"
"contentUrl": "/assets/image/emotionhero1-2.jpg",
"thumbnailUrl": "/assets/thumb/emotionhero1-2.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/emotionhero2.jpg",
"thumbnailUrl": "/assets\/thumb\/emotionhero2.jpg"
"contentUrl": "/assets/image/emotionhero2.jpg",
"thumbnailUrl": "/assets/thumb/emotionhero2.jpg"
}
]
},
{
"@type": "MediaObject",
"@id": "r:/choose-how-you-feel-you-have-seven-options",
"name": "Choose How You Feel; You Have Seven Options",
"dateCreated": "2016",
"duration": "9M9S (∞ loop)",
@ -824,20 +808,23 @@
},
"startDate": "2016-06-17",
"endDate": "2016-06-26",
"workFeatured": []
"workFeatured": [],
"about": {
"@id": "r:/degree/media-design"
}
}
]
},
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/choosehowyoufeel2-2.jpg",
"thumbnailUrl": "/assets\/thumb\/choosehowyoufeel2-2.jpg"
"contentUrl": "/assets/image/choosehowyoufeel2-2.jpg",
"thumbnailUrl": "/assets/thumb/choosehowyoufeel2-2.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/choosehowyoufeel.jpg",
"thumbnailUrl": "/assets\/thumb\/choosehowyoufeel.jpg"
"contentUrl": "/assets/image/choosehowyoufeel.jpg",
"thumbnailUrl": "/assets/thumb/choosehowyoufeel.jpg"
}
]
},
@ -857,24 +844,24 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/eye_0-2.jpg",
"thumbnailUrl": "/assets\/thumb\/eye_0-2.jpg"
"contentUrl": "/assets/image/eye_0-2.jpg",
"thumbnailUrl": "/assets/thumb/eye_0-2.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/eye_3-2.jpg",
"thumbnailUrl": "/assets\/thumb\/eye_3-2.jpg"
"contentUrl": "/assets/image/eye_3-2.jpg",
"thumbnailUrl": "/assets/thumb/eye_3-2.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/eye_6-2.jpg",
"thumbnailUrl": "/assets\/thumb\/eye_6-2.jpg"
"contentUrl": "/assets/image/eye_6-2.jpg",
"thumbnailUrl": "/assets/thumb/eye_6-2.jpg"
}
],
"video": {
"@id": "r:/eye-without-a-face/video",
"@type": "VideoObject",
"thumbnailUrl": "/assets\/thumb\/eye_1.jpg",
"thumbnailUrl": "/assets/thumb/eye_1.jpg",
"contentUrl": "http://works.rubenvandeven.com/2016-eye_without_a_face/EyeWithoutAFace.mp4",
"encodingFormat": "video/mp4",
"videoFrameSize": "1920x1080"
@ -928,7 +915,9 @@
"pageEnd": "423",
"isPartOf": [
"C&C '17 Proceedings of the 2017 ACM SIGCHI Conference on Creativity and Cognition",
{"@id": "r:/event/creativity-and-cognition"}
{
"@id": "r:/event/creativity-and-cognition"
}
],
"description": "What does it mean to feel 62% joy, and 15% surprised? Over the past years the digitization of emotions is booming business: multimillion dollar investments are made in technologies of which is claimed that they give companies an objective view in their consumers' feelings. The video-game-artwork Emotion Hero challenges the user to investigate this claim and question the premise of the technology. Emotion Hero is a two-part artwork. On the one hand is a video-game that is freely downloadable for everybody with an Android device. Inspired by Guitar Hero, the user scores points by following given cues. It provides detailed feedback on the mechanics of the face. The second part is a projection that shows a grid with aggregated scores of the game, that updates live. In its design, the grid refers to 19th century positivist practices.",
"url": "https://doi.org/10.1145/3059454.3059490/",
@ -962,7 +951,10 @@
"name": "Presentation @ BARTALK #12: Coded Gestures",
"startDate": "2018-10-26",
"endDate": "2018-10-26",
"organizer": ["Yun Ingrid Lee", "Rae Parnell"],
"organizer": [
"Yun Ingrid Lee",
"Rae Parnell"
],
"location": "Doornroosje, Rotterdam",
"url": "https://bartalkdh.wordpress.com/bartalk-12-coded-gestures/"
},
@ -1032,7 +1024,9 @@
"@type": "Event",
"name": "Presentation @ Creative Coding Utrecht",
"startDate": "2017",
"organizer": {"@id": "r:/organisation/ccu"},
"organizer": {
"@id": "r:/organisation/ccu"
},
"location": "Stadstuin, Utrecht"
},
{
@ -1114,18 +1108,18 @@
"@type": "MediaObject",
"name": "We know how you feel",
"dateCreated": "2015",
"description": "A two-part artwork and my first work on software that derives emotional parameters from facial expressions. The first part displays the <em>Mind Reading Emotions Library<\/em>, an interactive collection of videos, audio fragments and scenes depicting 412 distinct emotions &mdash;ranging from `angry' to `unsure'&mdash; grouped in 24 categories. The second part of the project is a tablet with a modified demo app by Affectiva, a major player in the field of emotion analysis software. This app acts as an interactive mirror which displays the various parameters that the Affectiva software derives from someone's facial expression, while a voice over reads a text extracted from the Dutch classic <em>Beyond Sleep<\/em> by W.F. Hermans (1966), concerning the impact of the mirror, photography and video on the human self-image.",
"description": "A two-part artwork and my first work on software that derives emotional parameters from facial expressions. The first part displays the <em>Mind Reading Emotions Library</em>, an interactive collection of videos, audio fragments and scenes depicting 412 distinct emotions &mdash;ranging from `angry' to `unsure'&mdash; grouped in 24 categories. The second part of the project is a tablet with a modified demo app by Affectiva, a major player in the field of emotion analysis software. This app acts as an interactive mirror which displays the various parameters that the Affectiva software derives from someone's facial expression, while a voice over reads a text extracted from the Dutch classic <em>Beyond Sleep</em> by W.F. Hermans (1966), concerning the impact of the mirror, photography and video on the human self-image.",
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/we_know_how_you_feel.jpg",
"thumbnailUrl": "/assets\/thumb\/we_know_how_you_feel.jpg",
"contentUrl": "/assets/image/we_know_how_you_feel.jpg",
"thumbnailUrl": "/assets/thumb/we_know_how_you_feel.jpg",
"caption": "We know how you feel"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/we_know_how_you_feel-3.jpg",
"thumbnailUrl": "/assets\/thumb\/we_know_how_you_feel-3.jpg",
"contentUrl": "/assets/image/we_know_how_you_feel-3.jpg",
"thumbnailUrl": "/assets/thumb/we_know_how_you_feel-3.jpg",
"caption": "Mind Reading Emotions Library"
}
],
@ -1150,7 +1144,6 @@
}
]
}
},
{
"@type": "MediaObject",
@ -1160,20 +1153,20 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/fragments-6-2.jpg",
"thumbnailUrl": "/assets\/thumb\/fragments-6-2.jpg",
"contentUrl": "/assets/image/fragments-6-2.jpg",
"thumbnailUrl": "/assets/thumb/fragments-6-2.jpg",
"caption": "Fragments of reality"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/fragments-9-2.jpg",
"thumbnailUrl": "/assets\/thumb\/fragments-9-2.jpg",
"contentUrl": "/assets/image/fragments-9-2.jpg",
"thumbnailUrl": "/assets/thumb/fragments-9-2.jpg",
"caption": "Fragments of reality"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/fragments-7-2.jpg",
"thumbnailUrl": "/assets\/thumb\/fragments-7-2.jpg",
"contentUrl": "/assets/image/fragments-7-2.jpg",
"thumbnailUrl": "/assets/thumb/fragments-7-2.jpg",
"caption": "Fragments of reality"
}
]
@ -1186,13 +1179,13 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/waterdagen-teaser.jpg",
"thumbnailUrl": "/assets\/thumb\/waterdagen-teaser.jpg"
"contentUrl": "/assets/image/waterdagen-teaser.jpg",
"thumbnailUrl": "/assets/thumb/waterdagen-teaser.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/waterdagen1.jpg",
"thumbnailUrl": "/assets\/thumb\/waterdagen1.jpg"
"contentUrl": "/assets/image/waterdagen1.jpg",
"thumbnailUrl": "/assets/thumb/waterdagen1.jpg"
}
],
"@reverse": {
@ -1222,8 +1215,8 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/copoet1.jpg",
"thumbnailUrl": "/assets\/thumb\/copoet1.jpg"
"contentUrl": "/assets/image/copoet1.jpg",
"thumbnailUrl": "/assets/thumb/copoet1.jpg"
}
],
"@reverse": {
@ -1251,13 +1244,13 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/samawati-prev2.jpg",
"thumbnailUrl": "/assets\/thumb\/samawati-prev2.jpg"
"contentUrl": "/assets/image/samawati-prev2.jpg",
"thumbnailUrl": "/assets/thumb/samawati-prev2.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/samawati-prev1.jpg",
"thumbnailUrl": "/assets\/thumb\/samawati-prev1.jpg"
"contentUrl": "/assets/image/samawati-prev1.jpg",
"thumbnailUrl": "/assets/thumb/samawati-prev1.jpg"
}
],
"video": {
@ -1293,6 +1286,7 @@
],
"contributor": [
{
"@id": "r:/pillow-talk",
"@type": "MediaObject",
"name": "Pillow Talk",
"dateCreated": "2019",
@ -1369,18 +1363,18 @@
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/pillow_talk01.jpg",
"thumbnailUrl": "/assets\/thumb\/pillow_talk01.jpg"
"contentUrl": "/assets/image/pillow_talk01.jpg",
"thumbnailUrl": "/assets/thumb/pillow_talk01.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/pillow_talk02.jpg",
"thumbnailUrl": "/assets\/thumb\/pillow_talk02.jpg"
"contentUrl": "/assets/image/pillow_talk02.jpg",
"thumbnailUrl": "/assets/thumb/pillow_talk02.jpg"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/pillow_talk03.jpg",
"thumbnailUrl": "/assets\/thumb\/pillow_talk03.jpg"
"contentUrl": "/assets/image/pillow_talk03.jpg",
"thumbnailUrl": "/assets/thumb/pillow_talk03.jpg"
}
],
"about": [
@ -1409,18 +1403,18 @@
"url": "http://www.wardgoes.nl"
},
"url": "http://spectacularspectacular.news",
"description": "Originally initiated as a graduation project (cum laude) by Ward Goes, <a href=\"http://spectacularspectacular.news\">The Spectacular Times<\/a> is an ongoing visual inquiry into the presentation of news. It investigates how news, rather than being subjective, is representational of its social, cultural, (geo)political and ideological contexts. The project sets out to lay bare these representations in currently circulating news.\n\nBy layering and contrasting different news elements The Spectacular Times re-contextualises news and makes explicit the intangible notions that lie beyond an increasingly universal guise of news reporting. Not in an effort to tell apart true from false, left from right, or right from wrong, but in order to accentuate a variety of articulations of news.\n\nThis web based project uses user defined variables to animate news headers, texts and images, which are directly sourced from different news websites world wide. By adjusting these parameters (among which region, scope and speed) the spectator actively perceives how news content is de- and reformed through its aesthetics.",
"description": "Originally initiated as a graduation project (cum laude) by Ward Goes, <a href=\"http://spectacularspectacular.news\">The Spectacular Times</a> is an ongoing visual inquiry into the presentation of news. It investigates how news, rather than being subjective, is representational of its social, cultural, (geo)political and ideological contexts. The project sets out to lay bare these representations in currently circulating news.\n\nBy layering and contrasting different news elements The Spectacular Times re-contextualises news and makes explicit the intangible notions that lie beyond an increasingly universal guise of news reporting. Not in an effort to tell apart true from false, left from right, or right from wrong, but in order to accentuate a variety of articulations of news.\n\nThis web based project uses user defined variables to animate news headers, texts and images, which are directly sourced from different news websites world wide. By adjusting these parameters (among which region, scope and speed) the spectator actively perceives how news content is de- and reformed through its aesthetics.",
"image": [
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/times1.jpg",
"thumbnailUrl": "/assets\/thumb\/times1.jpg",
"contentUrl": "/assets/image/times1.jpg",
"thumbnailUrl": "/assets/thumb/times1.jpg",
"caption": "The Spectacular Times"
},
{
"@type": "ImageObject",
"contentUrl": "/assets\/image\/times2.jpg",
"thumbnailUrl": "/assets\/thumb\/times2.jpg",
"contentUrl": "/assets/image/times2.jpg",
"thumbnailUrl": "/assets/thumb/times2.jpg",
"caption": "The Spectacular Times"
}
]
@ -1428,36 +1422,106 @@
],
"attendee": [
{
"@type": "Course",
"@id": "r:/residency/summer-sessions",
"@type": "VisualArtsEvent",
"name": "Residency: Summer Sessions 2016",
"url": [
"http://summersessions.net/17-projects/projects-2016/55-emotion-hero",
"http://www.arquivo237.com/en/Passado/manipulation-emotion-hero-2/"
],
"description": "I was part of the Summer Sessions Network for Talent Development in a co-production of Arquivo 237 and V2_ Lab for the Unstable Media, with support of the Creative Industries Fund NL.",
"startDate": "2016-09",
"endDate": "2016-10",
"about": {
"@id": "r:/emotionhero"
}
},
{
"@id": "r:/residency/q21",
"@type": "VisualArtsEvent",
"name": "Residency: Q21",
"startDate": "2017-01",
"endDate": "2017-02",
"url": "https://www.mqw.at/institutionen/q21/artists-in-residence/2016/ruben-van-de-ven/",
"@reverse": {
"subEvent": {
"@id": "r:/exhibition/mood_swings"
}
},
"location": {
"@id": "r:/place/q21"
}
},
{
"@id": "r:/event/cqrrelations",
"@type": "Event",
"name": "Cqrrelations Worksession",
"url": "http://cqrrelations.constantvzw.org/",
"startDate": "2015-01-18",
"endDate": "2015-01-23",
"organizer": {
"@id": "r:/organisation/constant",
"url": "http://constantvzw.org",
"@type": "Organization",
"name": "Constant"
}
}
],
"hasCredential": [
{
"@id": "r:/degree/media-design",
"@type": "EducationalOccupationalCredential",
"name": "MA - Media Design and Communication",
"provider": {"@id": "r:/university/piet-zwart"},
"addressLocality": "Rotterdam",
"credentialCategory": "Master of Arts",
"temporalCoverage": "2014-2016",
"educationalCredentialAwarded": "Master of Arts"
"@reverse": {
"educationalCredentialAwarded": {
"@id": "r:/university/piet-zwart"
}
},
"about": {
"@id": "r:/choose-how-you-feel-you-have-seven-options"
}
},
{
"@type": "Course",
"@id": "r:/degree/cddc",
"@type": "EducationalOccupationalCredential",
"name": "MA - Creative Design for Digital Cultures",
"provider": "The Open University",
"addressLocality": "London",
"credentialCategory": "Master of Arts",
"temporalCoverage": "2012-2013",
"educationalCredentialAwarded": "Master of Arts"
"@reverse": {
"educationalCredentialAwarded": {
"@type": "CollegeOrUniversity",
"name": "The Open University",
"addressLocality": "London"
}
}
},
{
"@type": "Course",
"@id": "r:/degree/avm",
"@type": "EducationalOccupationalCredential",
"name": "BA - Audio-visual Media",
"provider": "Hogeschool voor de Kunsten Utrecht",
"addressLocality": "Utrecht",
"credentialCategory": "Bachelor of Arts",
"temporalCoverage": "2009-2013",
"educationalCredentialAwarded": "Bachelor of Arts"
"@reverse": {
"educationalCredentialAwarded": {
"@type": "Hogeschool voor de Kunsten Utrecht",
"addressLocality": "Utrecht"
}
}
},
{
"@type": "Course",
"@id": "r:/degree/mechanical-engineering",
"@type": "EducationalOccupationalCredential",
"name": "Propaedeutic - Mechanical Engineering",
"provider": "Twente University",
"addressLocality": "Enschede",
"credentialCategory": "Propaedeutic degree",
"temporalCoverage": "2007-2009",
"educationalCredentialAwarded": "Propaedeutic degree"
"@reverse": {
"educationalCredentialAwarded": {
"@type": "Twente University",
"addressLocality": "Enschede"
}
}
}
]
}

View File

@ -33,7 +33,7 @@ function getNodeYear(n){
return n['https://schema.org/datePublished'].substr(0,4);
}
if(typeof n['https://schema.org/startDate'] !== 'undefined') {
console.log(n['https://schema.org/startDate']);
// console.log(n['https://schema.org/startDate']);
return n['https://schema.org/startDate'].substr(0,4);
}
if(typeof n['https://schema.org/endDate'] !== 'undefined') {
@ -114,10 +114,21 @@ var graph;
var nodeMap = {};
var linkMap = {};
var breadcrumbs = {};
var weights = {};
// load the flattened jsonld file
const requestPromise = fetch('/assets/js/rubenvandeven.jsonld')
.then(r => r.json())
.then(data => {
const requestPromise = fetch('/assets/js/rubenvandeven.jsonld').then(r => r.json());
const rankingPromise = fetch('/assets/js/ranking.json').then(r => r.json());
Promise.all([requestPromise, rankingPromise])
.then(values => {
if(values[0].hasOwnProperty('@graph')) {
data = values[0];
weights = values[1];
} else {
data = values[1];
weights = values[0];
}
graph = jsonLdToGraph(data['@graph']);
// create a map of nodes by id.
for(let i in graph.nodes) {
@ -169,8 +180,8 @@ var firstNodeId = "https://rubenvandeven.com/";
function getSizeForNode(node) {
if(node.hasOwnProperty('https://schema.org/thumbnailUrl'))
return nodeSize;
//if(weights[node['@id']])
// return nodeSize * weights[node['@id']];
if(weights[node['@id']])
return nodeSize * weights[node['@id']];
if(node['@id'] == firstNodeId)
return nodeSize*1.2;
// everynode has at least one link. these should equal 1
@ -442,7 +453,7 @@ var centerByType = function(types, updateHistory) {
deselectNode();
if(updateHistory) {
// TODO: working
console.log(types[0], getDisplayAttr(types[0]),types.map(getDisplayAttr));
// console.log(types[0], getDisplayAttr(types[0]),types.map(getDisplayAttr));
history.pushState({types: types}, "", "/@type/"+(types.map(getDisplayAttr).join("+")));
} else {
history.replaceState({types: types}, "", "/@type/"+(types.map(getDisplayAttr).join("+")));
@ -614,11 +625,15 @@ var setDetails = function(nodeDatum, nodeIdx) {
}
}
// relationships / links in <dl>
// relationships / links incomming <dl>
for(let attr in relDown) {
let attrEl = document.createElement("dt");
attrEl.innerHTML = getDisplayAttr(attr);
relsEl.appendChild(attrEl);
// highest pagerank first:
relDown[attr].sort((a,b) => weights[b['@id']] - weights[a['@id']]);
for(let i in relDown[attr]) {
let rel = relDown[attr][i];
relsEl.appendChild(createRelationshipEl(rel));
@ -637,10 +652,15 @@ var setDetails = function(nodeDatum, nodeIdx) {
}
}
// relationships / links outgoing <dl>
for(let attr in relUp) {
let attrEl = document.createElement("dt");
attrEl.innerHTML = getDisplayAttr(attr);
relsEl.appendChild(attrEl);
// highest pagerank first:
relUp[attr].sort((a,b) => weights[b['@id']] - weights[a['@id']]);
for(let i in relUp[attr]) {
let rel = relUp[attr][i];
relsEl.appendChild(createRelationshipEl(rel, i));

View File

@ -20,7 +20,8 @@ body{
// - NunitoSansRegular
font-weight: light;
height: 100vh;
background: black;
background:#222;
// background: radial-gradient(purple, darken(purple, 10%));
font-size: 12pt;
}
@ -271,7 +272,8 @@ text{
.nodeType{
font-size:80%;
text-transform: uppercase;
// text-transform: uppercase;
font-variant-caps: small-caps;
color: #999;
margin-left:10px;
@ -329,6 +331,7 @@ text{
font-weight:bold;
min-height:25px;
clear:both;
word-wrap: anywhere; // relations like "educationalCredentialAward" are crazily long..
}
dd{
min-height:30px;