Skip to content

Instantly share code, notes, and snippets.


Rik Van Bruggen rvanbruggen

View GitHub Profile
View BeerGraph with in-graph alcoholpercentage-index
return p;
View Belgian Beer Graph - Cypher Query Examples
**** BEER DATASET - CYPHER Query Examples ****
**** Beers from same brewery as DUVEL ****
START duvel=node:node_auto_index(name="Duvel")
View Cool ConceptNet Graph Queries
*** Some cool ConceptNet Graph Queries ***
*** Look up a concept in the Graph ***
START beer=node:Concepts(id="/c/en/beer")
return beer;
*** Figure out the relations of a concept to other concepts ***
rvanbruggen / My first BeerGist
Last active Dec 19, 2015 — forked from nawroth/tutorial-graphgist
BeerGraph GraphGist
View My first BeerGist
= My simple BeerGraph Datamodel =
Let's see if I can create a graphgist for my beers
CREATE (brewery:brewery{name:'Brewery'}), (beerbrand:beerbrand{name:'BeerBrand'}), (alcperc:alcoholpercentage{name:'Percentage'}), (beertype:beertype{name:'BeerType'})
CREATE (alcpercbefore:alcoholpercentage{name:'PercentageBefore'}), (alcpercafter:alcoholpercentage{name:'PercentageAfter'})
CREATE brewery-[:BREWS]->beerbrand<-[:HAS_ALCHOLHOL_PERCENTAGE]-alcperc
CREATE alcpercbefore-[:PRECEDES]->alcperc-[:PRECEDES]->alcpercafter
rvanbruggen / Business Rule Recommendation gist
Last active Dec 19, 2015
Business Rules / Recommendation gist
View Business Rule Recommendation gist
= Business Rule / Recommendation gist =
In this simple example, we want to highlight the power of graphs to describe, discover, visualise and implement powerful business rule-based recommendations.
In the example, we will create a simple graph containing
- a +person+ ("Rik")
- a +city+ ("London")
- an +age+ ("39")
- a +child+ ("Toon")
and all the required relationships from the person to the city, to his age, and his child.
rvanbruggen / Dataset Overview Gist
Last active May 25, 2016 Dataset Overview Gist
View Dataset Overview Gist
= Dataset Gist =
Earlier this month, I published[a blog post] about my fun with some self-exported[] data. With this Gist, I would like to provide a bit more practical detail on the dataset and how you could use it.
Let's first create an overview graph of the model.
rvanbruggen /
Last active Nov 11, 2020 — forked from ThomasCabrol/
Python script to query your LinkedIn network and get all your network's connections and their interconnections.
#!/usr/bin/env python
# encoding: utf-8
Created by Thomas Cabrol on 2012-12-03.
Customised by Rik Van Bruggen
Copyright (c) 2012 dataiku. All rights reserved.
Building the LinkedIn Graph
rvanbruggen / linkedin cypher.cql
Created Aug 9, 2013
Example queries to interactively query a linkedin-based neo4j database.
View linkedin cypher.cql
// Find Shortest paths between two contacts
n=node:node_auto_index(name='Emil Eifrem'),
m=node:node_auto_index(name='Steven Noels')
p = AllShortestPaths(n-[*]-m)
// Find all the relationships between two "first degree" contacts of RVB
rvanbruggen / Orienteering.adoc
Last active Aug 24, 2016
Orienteering Gist
View Orienteering.adoc

Orienteering Gist

This is the Orienteering Dataset based on the post.

XrXYFfsENq 5EpcOtyGN1UU7Z3RGhYdqfnWAjEafGjmmh0nCYdu8 LfImLcm7c3bjRIX8wJUnYaIpKFoAoMO3igUiVre3HKoYkqG5fHVkdmBfudfT7qlF7QbeA

It’s a simple, three-leg training course in an Antwerp park. The graph is really simple: it contains * the Controls of the simple course that I have here * the different route choices (in the form of a series of Waypoints) that an Orienteer could make to go from start to control point, to control point, to finish. Each of the "legs" of the course, and every route choice of that "leg", has a certain distance and runnability score (value from 0,1 to 1). We are thus dealing with a classic pathfinding problem, where we want to find the best route choice to complete the course.

rvanbruggen / IKEA graph nodes
Last active Dec 23, 2015
Setting up & querying the IKEA graph
View IKEA graph nodes
create ({id:'1',name:'DeepPAX',type:'ShopArticle'});
create ({id:'112996',name:'Screw',type:'Component'});
create ({id:'124593',name:'Nail',type:'Component'});
create ({id:'113434',name:'ScrewLock',type:'Component'});
create ({id:'101375',name:'WoodStick',type:'Component'});
create ({id:'100402',name:'Screw',type:'Component'});
create ({id:'100644',name:'Screw',type:'Component'});
create ({id:'100347',name:'Screw',type:'Component'});
create ({id:'103693',name:'LockPlate',type:'Component'});
create ({id:'123773',name:'CornerCover',type:'Component'});