Skip to content

Instantly share code, notes, and snippets.

Rik Van Bruggen rvanbruggen

Block or report user

Report or block rvanbruggen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rvanbruggen
rvanbruggen / 1-importing_from_google_sheet.cql
Last active Aug 8, 2017
Importing and querying the web of Belgian Public companies and their ceo's/chairmen
View 1-importing_from_google_sheet.cql
//Importing from the Google Spreadsheet
//import the Person nodes
load csv with headers from
"https://docs.google.com/spreadsheets/d/1_X628w_2Lx8ZAIPQQUAGhoDTuf31MRxY821E5D3u2Nc/export?format=csv&id=1_X628w_2Lx8ZAIPQQUAGhoDTuf31MRxY821E5D3u2Nc&gid=0" as persons
create (n:Node:Person)
set n = persons;
//import the Company nodes
load csv with headers from
"https://docs.google.com/spreadsheets/d/1_X628w_2Lx8ZAIPQQUAGhoDTuf31MRxY821E5D3u2Nc/export?format=csv&id=1_X628w_2Lx8ZAIPQQUAGhoDTuf31MRxY821E5D3u2Nc&gid=2040965723" as companies
@rvanbruggen
rvanbruggen / 1-import GCE2017 schedule.cql
Last active May 19, 2017
GraphConnect Europe 2017 Schedule Graph
View 1-import GCE2017 schedule.cql
create index on :Company(name);
create index on :Floor(name);
create index on :Person(name);
create index on :Time(time);
create index on :Room(name);
create index on :Session(title);
create index on :Tag(name);
create index on :Track(name);
schema await;
@rvanbruggen
rvanbruggen / 1-graph.json
Last active Nov 28, 2016
Paris Terrorist Attack Network
View 1-graph.json
{
"nodes" : [
{
"x" : 450,
"y" : 300,
"ID" : 0,
"label" : "Salah Abdeslam",
"type" : "persoon",
"alias" : "",
"geboren" : 1989,
@rvanbruggen
rvanbruggen / 1-graphconnectsfo2016-schedule.adoc
Last active Oct 9, 2016
GraphConnect San Francisco Schedule Graph
View 1-graphconnectsfo2016-schedule.adoc

The GraphConnect San Francisco 2016 Schedule Graph

Yey! It’s that time of the year again! We are full-steam getting ready for the Bi-Yearly Festival of Graphs also known as GraphConnect. There’s another great conference lined up for us in San Francisco. The entire Neo4j crew will be there in full force - and of course we had to create another Schedule graph - just for fun. The fact that we had 14hrs on a very tight airplane seat with a guy my size sitting next to me had nothing to do with it. At all.

A Google Sheet as the main repository

I had to of course start from the schedule on the GraphConnect website, and convert that into a google sheet with all the data. Tu

View BullshitGraph.adoc

The Bullshit Graph

bullshit

So I guess we have all lived it: lots of business and/or technical folks spouting bullshit during meetings or presentations. It can be quite a laugh, but can also be quite annoying to say the least. So that’s why all kinds of cool games have appeared on the wonderful world of the interwebs, to keep our spirits high and our aggravation low :) …​ I have seen things like bullshit bingo (who actually have a big data version of the game - which is quite funny!), but there’s also been these "bullshit generators" left right and center to make up the kind of stuff that you sometimes here real people say/present.

View 1-Original Orienteering graph.cql
create index on :Control(name);
create index on :Waypoint(name);
create (zero:Control {name:'Start'}),
(one:Control {name:'1'}),
(two:Control {name:'2'}),
(three:Control {name:'Finish'}),
(oneone:Waypoint {name:'011'}),
(onetwo:Waypoint {name:'012'}),
(onethree:Waypoint {name:'013'}),
@rvanbruggen
rvanbruggen / 1-loadolympics.cql
Last active Aug 25, 2016
Olympic Medallists
View 1-loadolympics.cql
create index on :Country(name);
create index on :City(name);
create index on :Sport(name);
create index on :Discipline(name);
create index on :Athlete(name);
create index on :Event(name);
create index on :Year(name);
create index on :Gender(name);
create constraint on (c:Country) assert c.noc is unique;
@rvanbruggen
rvanbruggen / 0-schema_ops.cql
Last active Jul 23, 2016
Tour de France 2016
View 0-schema_ops.cql
//This offers two alternative ways of setting up Indexes and Constraints for this dataset
//1. setup indexes & constraints - the manual way
create index on :StageType(name);
create index on :Rider(fullname);
create index on :Team(name);
create index on :Stage(seq);
create constraint on (c:City) assert c.name is unique;
//2. create all the indexes in one APOC
View import_panamapapers.cql
//wipe the database
match (n) detach delete n;
//create a constraint on the :Node label - this is temporary but speeds up the loading
create constraint on (n:Node) assert n.node_id is unique;
//add the addresses
USING PERIODIC COMMIT 10000
LOAD CSV WITH HEADERS FROM "file:///Addresses_fixed.csv" AS row MERGE (n:Node {node_id:row.node_id}) ON CREATE SET n = row, n:Address;
@rvanbruggen
rvanbruggen / graphconnect europe 2016 graphgist.adoc
Last active Apr 9, 2016
GraphConnect Europe 2016 Schedule graph
View graphconnect europe 2016 graphgist.adoc

The GraphConnect Europe 2016 Schedule Graph

Yey! It’s that time of the year again! We are full-steam getting ready for the Bi-Yearly Festival of Graphs also known as GraphConnect. There’s another great conference lined up for us. The entire Neo4j crew will be there in full force - and of course we had to create another Schedule graph - just for fun.

A Google Sheet as the main repository

I had to of course start from the schedule on the GraphConnect website, and convert that into a google sheet with all the data. Once I had that, I could add the data pretty easily with this model:

You can’t perform that action at this time.