Skip to content

Instantly share code, notes, and snippets.

@thepuzzlemaster
Last active August 29, 2015 14:11
Show Gist options
  • Save thepuzzlemaster/b0d3b5626f79c195ebf0 to your computer and use it in GitHub Desktop.
Save thepuzzlemaster/b0d3b5626f79c195ebf0 to your computer and use it in GitHub Desktop.
Tier 7 #4
{"description":"Tier 7 #4","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"data.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.css":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"thumbnail":"http://i.imgur.com/S8s8dCn.png","inline-console":false}
[
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:givenName",
"object": "Gorongah"
},
{
"subject": "http://www.example.com/somebody174#me",
"predicate": "foaf:givenName",
"object": "Xenoel"
},
{
"subject": "http://www.example.com/somebody53#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody341#me",
"predicate": "foaf:depiction",
"object": "https://newevolutiondesigns.com/images/freebies/cat-wallpaper-22.jpg"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody74#me",
"predicate": "foaf:interest",
"object": "alchemy"
},
{
"subject": "http://www.example.com/somebody251#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody241#me"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody74#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody43#me"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody225#me"
},
{
"subject": "http://www.example.com/somebody60#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody53#me"
},
{
"subject": "http://www.example.com/somebody251#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody174#me",
"predicate": "foaf:based_near",
"object": "The White Keep"
},
{
"subject": "http://www.example.com/somebody231#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody74#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "foaf:interest",
"object": "archery"
},
{
"subject": "http://www.example.com/somebody436#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "foaf:interest",
"object": "philosophy"
},
{
"subject": "http://www.example.com/somebody324#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody312#me"
},
{
"subject": "http://www.example.com/somebody251#me",
"predicate": "foaf:interest",
"object": "soothsaying"
},
{
"subject": "http://www.example.com/somebody417#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody427#me"
},
{
"subject": "http://www.example.com/somebody324#me",
"predicate": "foaf:based_near",
"object": "The White Keep"
},
{
"subject": "http://www.example.com/somebody341#me",
"predicate": "foaf:interest",
"object": "falconry"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody251#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody53#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody231#me",
"predicate": "foaf:interest",
"object": "philosophy"
},
{
"subject": "http://www.example.com/somebody453#me",
"predicate": "foaf:interest",
"object": "carpentry"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody74#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody88#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody312#me",
"predicate": "foaf:depiction",
"object": "http://scienceblogs.com/gregladen/files/2012/12/Beautifull-cat-cats-14749885-1600-1200.jpg"
},
{
"subject": "http://www.example.com/somebody264#me",
"predicate": "foaf:givenName",
"object": "Xenoasan"
},
{
"subject": "http://www.example.com/somebody225#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody264#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody216#me"
},
{
"subject": "http://www.example.com/somebody341#me",
"predicate": "foaf:givenName",
"object": "Demielan"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody53#me",
"predicate": "foaf:interest",
"object": "conquest"
},
{
"subject": "http://www.example.com/somebody151#me",
"predicate": "foaf:givenName",
"object": "Karanoran"
},
{
"subject": "http://www.example.com/somebody264#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody251#me"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody436#me"
},
{
"subject": "http://www.example.com/somebody53#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody60#me"
},
{
"subject": "http://www.example.com/somebody151#me",
"predicate": "foaf:depiction",
"object": "http://jasonlefkowitz.net/wp-content/uploads/2013/07/cats-16140154-1920-1080.jpg"
},
{
"subject": "http://www.example.com/somebody341#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody301#me"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody88#me"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody130#me"
},
{
"subject": "http://www.example.com/somebody444#me",
"predicate": "foaf:interest",
"object": "hunting"
},
{
"subject": "http://www.example.com/somebody453#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody444#me"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody462#me"
},
{
"subject": "http://www.example.com/somebody14#me",
"predicate": "foaf:depiction",
"object": "https://newevolutiondesigns.com/images/freebies/cat-wallpaper-22.jpg"
},
{
"subject": "http://www.example.com/somebody60#me",
"predicate": "foaf:givenName",
"object": "Karanasan"
},
{
"subject": "http://www.example.com/somebody274#me",
"predicate": "foaf:interest",
"object": "falconry"
},
{
"subject": "http://www.example.com/somebody225#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody125#me",
"predicate": "foaf:givenName",
"object": "Lizaa"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody251#me"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody174#me"
},
{
"subject": "http://www.example.com/somebody251#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody204#me"
},
{
"subject": "http://www.example.com/somebody231#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody225#me"
},
{
"subject": "http://www.example.com/somebody341#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody330#me"
},
{
"subject": "http://www.example.com/somebody417#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "foaf:givenName",
"object": "Brungah"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "foaf:depiction",
"object": "http://upload.wikimedia.org/wikipedia/commons/6/69/June_odd-eyed-cat_cropped.jpg"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody241#me"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody216#me"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "foaf:givenName",
"object": "Granelan"
},
{
"subject": "http://www.example.com/somebody112#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody125#me"
},
{
"subject": "http://www.example.com/somebody436#me",
"predicate": "foaf:interest",
"object": "metalworking"
},
{
"subject": "http://www.example.com/somebody330#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody301#me"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "foaf:givenName",
"object": "Lizamur"
},
{
"subject": "http://www.example.com/somebody231#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody241#me"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody165#me"
},
{
"subject": "http://www.example.com/somebody251#me",
"predicate": "foaf:depiction",
"object": "https://newevolutiondesigns.com/images/freebies/cat-wallpaper-22.jpg"
},
{
"subject": "http://www.example.com/somebody88#me",
"predicate": "foaf:interest",
"object": "hunting"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody125#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody105#me"
},
{
"subject": "http://www.example.com/somebody341#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody43#me"
},
{
"subject": "http://www.example.com/somebody444#me",
"predicate": "foaf:depiction",
"object": "http://nextranks.com/data_images/main/cats/cats-03.jpg"
},
{
"subject": "http://www.example.com/somebody151#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody105#me"
},
{
"subject": "http://www.example.com/somebody53#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody3#me"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody125#me"
},
{
"subject": "http://www.example.com/somebody453#me",
"predicate": "foaf:givenName",
"object": "Barbaranoran"
},
{
"subject": "http://www.example.com/somebody165#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody112#me",
"predicate": "foaf:depiction",
"object": "http://scienceblogs.com/gregladen/files/2012/12/Beautifull-cat-cats-14749885-1600-1200.jpg"
},
{
"subject": "http://www.example.com/somebody88#me",
"predicate": "foaf:depiction",
"object": "http://upload.wikimedia.org/wikipedia/commons/6/69/June_odd-eyed-cat_cropped.jpg"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "foaf:depiction",
"object": "http://jasonlefkowitz.net/wp-content/uploads/2013/07/cats-16140154-1920-1080.jpg"
},
{
"subject": "http://www.example.com/somebody417#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody330#me",
"predicate": "foaf:depiction",
"object": "http://i.huffpost.com/gen/1860407/thumbs/o-BLACK-FOOTED-CAT-KITTENS-facebook.jpg"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody231#me"
},
{
"subject": "http://www.example.com/somebody462#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody151#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "foaf:interest",
"object": "falconry"
},
{
"subject": "http://www.example.com/somebody60#me",
"predicate": "foaf:interest",
"object": "conquest"
},
{
"subject": "http://www.example.com/somebody174#me",
"predicate": "foaf:depiction",
"object": "http://i.huffpost.com/gen/1860407/thumbs/o-BLACK-FOOTED-CAT-KITTENS-facebook.jpg"
},
{
"subject": "http://www.example.com/somebody14#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody125#me",
"predicate": "foaf:depiction",
"object": "http://scienceblogs.com/gregladen/files/2012/12/Beautifull-cat-cats-14749885-1600-1200.jpg"
},
{
"subject": "http://www.example.com/somebody14#me",
"predicate": "foaf:givenName",
"object": "Brunmur"
},
{
"subject": "http://www.example.com/somebody324#me",
"predicate": "foaf:givenName",
"object": "Grana"
},
{
"subject": "http://www.example.com/somebody330#me",
"predicate": "foaf:based_near",
"object": "The White Keep"
},
{
"subject": "http://www.example.com/somebody274#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody453#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody462#me"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody330#me"
},
{
"subject": "http://www.example.com/somebody231#me",
"predicate": "foaf:givenName",
"object": "Grano"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody53#me"
},
{
"subject": "http://www.example.com/somebody462#me",
"predicate": "foaf:givenName",
"object": "Nomaasan"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody3#me"
},
{
"subject": "http://www.example.com/somebody74#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody60#me"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody60#me"
},
{
"subject": "http://www.example.com/somebody88#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody74#me"
},
{
"subject": "http://www.example.com/somebody436#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody444#me"
},
{
"subject": "http://www.example.com/somebody60#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody444#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody453#me"
},
{
"subject": "http://www.example.com/somebody264#me",
"predicate": "foaf:depiction",
"object": "http://jasonlefkowitz.net/wp-content/uploads/2013/07/cats-16140154-1920-1080.jpg"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:depiction",
"object": "http://upload.wikimedia.org/wikipedia/commons/6/69/June_odd-eyed-cat_cropped.jpg"
},
{
"subject": "http://www.example.com/somebody165#me",
"predicate": "foaf:interest",
"object": "hunting"
},
{
"subject": "http://www.example.com/somebody125#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "foaf:depiction",
"object": "http://a.dilcdn.com/bl/wp-content/uploads/sites/8/2012/09/02-11.jpg"
},
{
"subject": "http://www.example.com/somebody453#me",
"predicate": "foaf:based_near",
"object": "Limnal Vale"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:interest",
"object": "conquest"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody112#me"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "foaf:givenName",
"object": "Lizagah"
},
{
"subject": "http://www.example.com/somebody462#me",
"predicate": "foaf:depiction",
"object": "http://kittytonpost.com/wp-content/uploads/2013/07/Kittytonpost_wallpaper04.jpg"
},
{
"subject": "http://www.example.com/somebody112#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "foaf:depiction",
"object": "http://i.huffpost.com/gen/1860407/thumbs/o-BLACK-FOOTED-CAT-KITTENS-facebook.jpg"
},
{
"subject": "http://www.example.com/somebody312#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody301#me"
},
{
"subject": "http://www.example.com/somebody231#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody88#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody312#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody53#me"
},
{
"subject": "http://www.example.com/somebody453#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody427#me"
},
{
"subject": "http://www.example.com/somebody436#me",
"predicate": "foaf:givenName",
"object": "Demio"
},
{
"subject": "http://www.example.com/somebody312#me",
"predicate": "foaf:based_near",
"object": "The White Keep"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody141#me"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody225#me"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "foaf:givenName",
"object": "Kharlgah"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "foaf:depiction",
"object": "http://kittytonpost.com/wp-content/uploads/2013/07/Kittytonpost_wallpaper04.jpg"
},
{
"subject": "http://www.example.com/somebody324#me",
"predicate": "foaf:interest",
"object": "alchemy"
},
{
"subject": "http://www.example.com/somebody23#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody274#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody241#me"
},
{
"subject": "http://www.example.com/somebody225#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody216#me"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody231#me"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "foaf:interest",
"object": "alchemy"
},
{
"subject": "http://www.example.com/somebody151#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody165#me"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody312#me"
},
{
"subject": "http://www.example.com/somebody88#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody36#me"
},
{
"subject": "http://www.example.com/somebody125#me",
"predicate": "foaf:interest",
"object": "philosophy"
},
{
"subject": "http://www.example.com/somebody174#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody165#me",
"predicate": "foaf:depiction",
"object": "https://newevolutiondesigns.com/images/freebies/cat-wallpaper-22.jpg"
},
{
"subject": "http://www.example.com/somebody60#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody3#me"
},
{
"subject": "http://www.example.com/somebody251#me",
"predicate": "foaf:givenName",
"object": "Demioran"
},
{
"subject": "http://www.example.com/somebody453#me",
"predicate": "foaf:depiction",
"object": "http://upload.wikimedia.org/wikipedia/commons/6/69/June_odd-eyed-cat_cropped.jpg"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "foaf:interest",
"object": "metalworking"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "foaf:depiction",
"object": "http://upload.wikimedia.org/wikipedia/commons/6/69/June_odd-eyed-cat_cropped.jpg"
},
{
"subject": "http://www.example.com/somebody74#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody88#me"
},
{
"subject": "http://www.example.com/somebody417#me",
"predicate": "foaf:interest",
"object": "conquest"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody204#me"
},
{
"subject": "http://www.example.com/somebody14#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody23#me"
},
{
"subject": "http://www.example.com/somebody274#me",
"predicate": "foaf:givenName",
"object": "Barbaranel"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody74#me"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "foaf:givenName",
"object": "Lizao"
},
{
"subject": "http://www.example.com/somebody330#me",
"predicate": "foaf:givenName",
"object": "Karano"
},
{
"subject": "http://www.example.com/somebody112#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody141#me"
},
{
"subject": "http://www.example.com/somebody151#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody141#me"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "foaf:interest",
"object": "dark arts"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody105#me"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody417#me"
},
{
"subject": "http://www.example.com/somebody60#me",
"predicate": "foaf:depiction",
"object": "https://newevolutiondesigns.com/images/freebies/cat-wallpaper-22.jpg"
},
{
"subject": "http://www.example.com/somebody312#me",
"predicate": "foaf:givenName",
"object": "Shelmur"
},
{
"subject": "http://www.example.com/somebody330#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody341#me"
},
{
"subject": "http://www.example.com/somebody341#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody74#me",
"predicate": "foaf:givenName",
"object": "Demiel"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "foaf:depiction",
"object": "http://kittytonpost.com/wp-content/uploads/2013/07/Kittytonpost_wallpaper04.jpg"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody401#me"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "foaf:based_near",
"object": "Limnal Vale"
},
{
"subject": "http://www.example.com/somebody174#me",
"predicate": "foaf:interest",
"object": "archery"
},
{
"subject": "http://www.example.com/somebody23#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody14#me"
},
{
"subject": "http://www.example.com/somebody14#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody174#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody165#me"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody14#me"
},
{
"subject": "http://www.example.com/somebody225#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody231#me"
},
{
"subject": "http://www.example.com/somebody165#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody151#me"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "foaf:based_near",
"object": "Erranglade"
},
{
"subject": "http://www.example.com/somebody417#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody401#me"
},
{
"subject": "http://www.example.com/somebody436#me",
"predicate": "foaf:depiction",
"object": "http://a.dilcdn.com/bl/wp-content/uploads/sites/8/2012/09/02-11.jpg"
},
{
"subject": "http://www.example.com/somebody324#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody231#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody204#me"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "foaf:based_near",
"object": "The White Keep"
},
{
"subject": "http://www.example.com/somebody23#me",
"predicate": "foaf:interest",
"object": "falconry"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody436#me"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody427#me"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody23#me"
},
{
"subject": "http://www.example.com/somebody125#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody112#me"
},
{
"subject": "http://www.example.com/somebody23#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody274#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody264#me"
},
{
"subject": "http://www.example.com/somebody23#me",
"predicate": "foaf:depiction",
"object": "http://nextranks.com/data_images/main/cats/cats-03.jpg"
},
{
"subject": "http://www.example.com/somebody14#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody43#me"
},
{
"subject": "http://www.example.com/somebody274#me",
"predicate": "foaf:depiction",
"object": "http://scienceblogs.com/gregladen/files/2012/12/Beautifull-cat-cats-14749885-1600-1200.jpg"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody444#me",
"predicate": "foaf:givenName",
"object": "Xenoelan"
},
{
"subject": "http://www.example.com/somebody165#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody174#me"
},
{
"subject": "http://www.example.com/somebody462#me",
"predicate": "foaf:interest",
"object": "soothsaying"
},
{
"subject": "http://www.example.com/somebody462#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody401#me"
},
{
"subject": "http://www.example.com/somebody23#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody3#me"
},
{
"subject": "http://www.example.com/somebody36#me",
"predicate": "foaf:based_near",
"object": "Dunderfell"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "foaf:based_near",
"object": "Erranglade"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "foaf:givenName",
"object": "Shelgah"
},
{
"subject": "http://www.example.com/somebody274#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody74#me",
"predicate": "foaf:depiction",
"object": "http://i.huffpost.com/gen/1860407/thumbs/o-BLACK-FOOTED-CAT-KITTENS-facebook.jpg"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody112#me"
},
{
"subject": "http://www.example.com/somebody251#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody264#me"
},
{
"subject": "http://www.example.com/somebody225#me",
"predicate": "foaf:depiction",
"object": "http://upload.wikimedia.org/wikipedia/commons/6/69/June_odd-eyed-cat_cropped.jpg"
},
{
"subject": "http://www.example.com/somebody444#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody436#me"
},
{
"subject": "http://www.example.com/somebody112#me",
"predicate": "foaf:based_near",
"object": "Erranglade"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "foaf:depiction",
"object": "http://scienceblogs.com/gregladen/files/2012/12/Beautifull-cat-cats-14749885-1600-1200.jpg"
},
{
"subject": "http://www.example.com/somebody312#me",
"predicate": "foaf:interest",
"object": "dark arts"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "foaf:givenName",
"object": "Karana"
},
{
"subject": "http://www.example.com/somebody112#me",
"predicate": "foaf:interest",
"object": "metalworking"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody264#me"
},
{
"subject": "http://www.example.com/somebody112#me",
"predicate": "foaf:givenName",
"object": "Kharlmur"
},
{
"subject": "http://www.example.com/somebody264#me",
"predicate": "foaf:interest",
"object": "alchemy"
},
{
"subject": "http://www.example.com/somebody330#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody324#me"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "foaf:givenName",
"object": "Shelelan"
},
{
"subject": "http://www.example.com/somebody165#me",
"predicate": "foaf:based_near",
"object": "Erranglade"
},
{
"subject": "http://www.example.com/somebody125#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody130#me"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody274#me"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody417#me"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody23#me"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "foaf:based_near",
"object": "Limnal Vale"
},
{
"subject": "http://www.example.com/somebody125#me",
"predicate": "foaf:based_near",
"object": "Erranglade"
},
{
"subject": "http://www.example.com/somebody417#me",
"predicate": "foaf:depiction",
"object": "http://kittytonpost.com/wp-content/uploads/2013/07/Kittytonpost_wallpaper04.jpg"
},
{
"subject": "http://www.example.com/somebody453#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "foaf:interest",
"object": "conquest"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody36#me"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "foaf:based_near",
"object": "Erranglade"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody453#me"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "foaf:givenName",
"object": "Shelo"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "foaf:interest",
"object": "philosophy"
},
{
"subject": "http://www.example.com/somebody216#me",
"predicate": "foaf:depiction",
"object": "http://kittytonpost.com/wp-content/uploads/2013/07/Kittytonpost_wallpaper04.jpg"
},
{
"subject": "http://www.example.com/somebody427#me",
"predicate": "foaf:interest",
"object": "falconry"
},
{
"subject": "http://www.example.com/somebody444#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody151#me",
"predicate": "foaf:interest",
"object": "metalworking"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody341#me"
},
{
"subject": "http://www.example.com/somebody330#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody225#me",
"predicate": "foaf:interest",
"object": "philosophy"
},
{
"subject": "http://www.example.com/somebody330#me",
"predicate": "foaf:interest",
"object": "falconry"
},
{
"subject": "http://www.example.com/somebody401#me",
"predicate": "foaf:depiction",
"object": "http://jasonlefkowitz.net/wp-content/uploads/2013/07/cats-16140154-1920-1080.jpg"
},
{
"subject": "http://www.example.com/somebody165#me",
"predicate": "foaf:givenName",
"object": "Demiasan"
},
{
"subject": "http://www.example.com/somebody417#me",
"predicate": "foaf:givenName",
"object": "Granmur"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "foaf:interest",
"object": "dark arts"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody14#me"
},
{
"subject": "http://www.example.com/somebody53#me",
"predicate": "foaf:givenName",
"object": "Granoran"
},
{
"subject": "http://www.example.com/somebody53#me",
"predicate": "foaf:depiction",
"object": "http://i.huffpost.com/gen/1860407/thumbs/o-BLACK-FOOTED-CAT-KITTENS-facebook.jpg"
},
{
"subject": "http://www.example.com/somebody204#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody251#me"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "foaf:givenName",
"object": "Karanelan"
},
{
"subject": "http://www.example.com/somebody417#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody444#me"
},
{
"subject": "http://www.example.com/somebody444#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody417#me"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody264#me",
"predicate": "foaf:based_near",
"object": "Fontainbleur"
},
{
"subject": "http://www.example.com/somebody43#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody36#me"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody324#me",
"predicate": "foaf:depiction",
"object": "http://nextranks.com/data_images/main/cats/cats-03.jpg"
},
{
"subject": "http://www.example.com/somebody165#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody130#me"
},
{
"subject": "http://www.example.com/somebody14#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody3#me"
},
{
"subject": "http://www.example.com/somebody324#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody301#me"
},
{
"subject": "http://www.example.com/somebody151#me",
"predicate": "foaf:based_near",
"object": "Erranglade"
},
{
"subject": "http://www.example.com/somebody264#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody53#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody43#me"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "foaf:interest",
"object": "conquest"
},
{
"subject": "http://www.example.com/somebody241#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody216#me"
},
{
"subject": "http://www.example.com/somebody264#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody274#me"
},
{
"subject": "http://www.example.com/somebody324#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody330#me"
},
{
"subject": "http://www.example.com/somebody312#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody324#me"
},
{
"subject": "http://www.example.com/somebody444#me",
"predicate": "foaf:based_near",
"object": "Limnal Vale"
},
{
"subject": "http://www.example.com/somebody112#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody105#me"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "foaf:depiction",
"object": "http://jasonlefkowitz.net/wp-content/uploads/2013/07/cats-16140154-1920-1080.jpg"
},
{
"subject": "http://www.example.com/somebody60#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody74#me"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody130#me"
},
{
"subject": "http://www.example.com/somebody436#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody427#me"
},
{
"subject": "http://www.example.com/somebody105#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody151#me"
},
{
"subject": "http://www.example.com/somebody23#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody36#me"
},
{
"subject": "http://www.example.com/somebody88#me",
"predicate": "foaf:givenName",
"object": "Xenouren"
},
{
"subject": "http://www.example.com/somebody141#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody151#me"
},
{
"subject": "http://www.example.com/somebody23#me",
"predicate": "foaf:givenName",
"object": "Kharla"
},
{
"subject": "http://www.example.com/somebody301#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody324#me"
},
{
"subject": "http://www.example.com/somebody462#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody453#me"
},
{
"subject": "http://www.example.com/somebody462#me",
"predicate": "foaf:based_near",
"object": "Limnal Vale"
},
{
"subject": "http://www.example.com/somebody225#me",
"predicate": "foaf:givenName",
"object": "Shela"
},
{
"subject": "http://www.example.com/somebody14#me",
"predicate": "foaf:interest",
"object": "falconry"
},
{
"subject": "http://www.example.com/somebody174#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody141#me"
},
{
"subject": "http://www.example.com/somebody60#me",
"predicate": "rdf:type",
"object": "foaf:Person"
},
{
"subject": "http://www.example.com/somebody436#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody401#me"
},
{
"subject": "http://www.example.com/somebody436#me",
"predicate": "foaf:based_near",
"object": "Limnal Vale"
},
{
"subject": "http://www.example.com/somebody225#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody204#me"
},
{
"subject": "http://www.example.com/somebody130#me",
"predicate": "foaf:knows",
"object": "http://www.example.com/somebody125#me"
},
{
"subject": "http://www.example.com/somebody231#me",
"predicate": "foaf:depiction",
"object": "http://scienceblogs.com/gregladen/files/2012/12/Beautifull-cat-cats-14749885-1600-1200.jpg"
},
{
"subject": "http://www.example.com/somebody3#me",
"predicate": "rdf:type",
"object": "foaf:Person"
}
]
console.clear();
var interests = ['falconry', 'conquest', 'hunting', 'alchemy', 'archery', 'carpentry', 'dark arts', 'metalworking', 'philosophy', 'soothsaying'];
var locations = ['Dunderfell', 'Erranglade', 'Fontainbleur', 'The White Keep', 'Limnal Vale'];
var colorRange = ["#000000","#008000","#00FF00","#FFFF00","#800000","#FF0000","#0000FF","#008080","#FF00FF","#00FFFF"];
var interestScale = d3.scale.linear()
.domain([0, colorRange.length])
// .interpolate(d3.interpolateHcl)
// .interpolate(d3.interpolateRgb)
// .interpolate(d3.interpolateLab)
.range(colorRange)
.clamp(false);
var locationsScale = d3.scale.linear()
.domain([0, locations.length])
.interpolate(d3.interpolateHcl)
.range(['#0037ff', '#b2ff00'])
.clamp(false);
var data = tributary.data;
data = _.map(data, function(item) {
item.subject = item.subject.replace('http://www.example.com/somebody', 'root.').replace('#me', '');
item.object = item.object.replace('http://www.example.com/somebody', 'root.').replace('#me', '');
return item;
});
var depictions = [];
_.forEach(data, function(item) {
if (item.predicate === 'foaf:depiction') {
depictions.push(item.object);
}
});
depictions = _.uniq(depictions);
var depictionsScale = d3.scale.linear()
.domain([0, depictions.length])
.interpolate(d3.interpolateHcl)
.range(['#00fff6', '#ff053b'])
.clamp(true);
data = _.filter(data, function(item) {
return true;
return item.predicate === 'foaf:based_near';
});
var newData = d3.nest()
.key(function(item) {
// return item.predicate.replace('foaf:', '').replace('rdf:', '');
// return item.object;
return item.subject.replace('http://www.example.com/somebody', 'root.').replace('#me', '');
})
.sortKeys(function(a, b) {
a = Number(a.replace('root.', ''));
b = Number(b.replace('root.', ''));
return a - b;
})
.entries(data);
//console.log(newData)
//return;
_.forEach(newData, function(person) {
person.name = person.key;
person.knows = [];
_.forEach(person.values, function(value) {
if (value.predicate.indexOf('knows') === -1) {
person[value.predicate.replace('foaf:', '').replace('rdf:', '')] = value.object;
} else {
person.knows.push(value.object.replace('http://www.example.com/somebody', 'root.').replace('#me', ''));
}
});
});
var location = _.groupBy(newData, 'based_near');
var name = _.groupBy(newData, 'givenName');
var interest = _.groupBy(newData, 'interest');
var depiction = _.groupBy(newData, 'depiction');
var type = _.groupBy(newData, 'type');
// console.log(location, 'location');
// console.log(name, 'name');
// console.log(interest, 'interest');
// console.log(depiction, 'depiction');
// console.log(newData, 'newData');
newData = _.map(newData, function(item) {
delete item.values;
delete item.key;
return item;
});
var allData = [];
_.map(location, function(value, key) {
allData.push({
name: 'root.' + key
});
});
_.map(interest, function(value, key) {
// allData.push({
// name: 'root.' + key
// })
});
_.map(depiction, function(value, key) {
// allData.push({
// name: 'root.' + key
// })
});
//newData = _.sortBy(newData, 'based_near');
_.map(newData, function(value, key) {
allData.push(value);
});
console.log(allData);
//console.log(newData)
var nestedData = d3.nest()
.key(function(d) {
return d.based_near;
})
.key(function(d) {
return d.name;
})
.key(function(d) {
return d.depiction;
})
.entries(newData);
_.forEach(nestedData, function(location) {
location.name = location.key;
location.children = location.values;
_.forEach(location.children, function(person) {
person.name = person.key;
person.children = person.values;
_.forEach(person.children, function(interest) {
interest.name = interest.key
})
})
})
// console.log(nestedData, 'nestedData');
// return;
var diameter = 652;
var radius = diameter / 2;
var innerRadius = radius - 84;
var cluster = d3.layout.cluster()
.size([360, innerRadius])
.sort(null)
.value(function(d) { return d.size; });
var bundle = d3.layout.bundle();
var line = d3.svg.line.radial()
.interpolate("bundle")
.tension(.49)
.radius(function(d) { return d.y; })
.angle(function(d) { return d.x / 180 * Math.PI; });
var svg = d3.select("svg")
.attr("width", diameter)
.attr("height", diameter)
.append("g")
.attr("transform", "translate(" + radius + "," + radius + ")");
var nodes = cluster.nodes(packageHierarchy(allData)),
links = packageImports(nodes);
svg.selectAll(".link")
.data(bundle(links))
.enter().append("path")
.attr('stroke', function(d) {
if (locations.indexOf(d[0].based_near) === -1) {
console.log(d[0].based_near)
}
return locationsScale(locations.indexOf(d[0].based_near));
})
.attr("class", "link")
.attr("d", line);
svg.selectAll(".node")
.data(nodes.filter(function(n) { return !n.children; }))
.enter()
.append("g")
.attr("class", "node")
.attr("transform", function(d) { return "rotate(" + (d.x - 90) + ")translate(" + d.y + ")"; })
.append("text")
.attr("dx", function(d) { return d.x < 180 ? 8 : -8; })
.attr("dy", ".31em")
.attr("text-anchor", function(d) { return d.x < 180 ? "start" : "end"; })
.attr("transform", function(d) { return d.x < 180 ? null : "rotate(180)"; })
.text(function(d) {
return d.name.replace('root.', '') + ' :' + d.interest;
});
d3.select(self.frameElement).style("height", diameter + "px");
// Lazily construct the package hierarchy from class names.
function packageHierarchy(classes) {
var map = {};
function find(name, data) {
var node = map[name], i;
if (!node) {
node = map[name] = data || {name: name, children: []};
if (name.length) {
node.parent = find(name.substring(0, i = name.lastIndexOf(".")));
node.parent.children.push(node);
node.key = name.substring(i + 1);
}
}
return node;
}
classes.forEach(function(d) {
find(d.name, d);
});
return map[""];
}
// Return a list of imports for the given array of nodes.
function packageImports(nodes) {
var map = {},
imports = [];
// Compute a map from name to node.
nodes.forEach(function(d) {
map[d.name] = d;
});
// For each import, construct a link from the source to target node.
nodes.forEach(function(d) {
if (d.interest && false) {
imports.push({
source: map[d.name],
target: map['root.' + d.interest]
});
}
if (d.based_near && false) {
imports.push({
source: map[d.name],
target: map['root.' + d.based_near]
});
}
if (d.depiction && false) {
imports.push({
source: map[d.name],
target: map['root.' + d.depiction]
});
}
if (d.knows && d.knows.length > 0) d.knows.forEach(function(i) {
imports.push({source: map[d.name], target: map[i]});
});
});
return imports;
}
.node {
font: 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.link {
stroke-opacity: 1;
fill: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment