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 / colruyt datascience homework assignment.cql
Created Nov 7, 2019
colruyt datascience homework assignment.cql
View colruyt datascience homework assignment.cql
//colruyt datascience homework assignment in Neo4j
// from: https://github.com/MarkiesFredje/data-engineering-exercise/blob/master/data_engineer_exercise.ipynb
// json file download location: https://ecgplacesmw.colruytgroup.com/ecgplacesmw/v3/nl/places/filter/clp-places
//import into neo4j using apoc
//create indexes and constraint
create index on :Address(streetName);
create index on :City(name);
@rvanbruggen
rvanbruggen / 1-importscript
Created Nov 4, 2013
Browser History - Clickstream Analysis with Neo4j
View 1-importscript
// this script uses the neo4j-shell-tools
// create personal nodes
import-cypher -d ; -i ./IMPORT/INPUT/PersonalNodes.csv -o ./IMPORT/OUTPUT/personalnodeout.csv create (n:url {id:{id}+1000,name:{name},type:{type}}) return n.name as name
// create indices
CREATE index on :url(name);
CREATE index on :url(id);
CREATE index on :url(type);
@rvanbruggen
rvanbruggen / 1-load_gtdb_script.cql
Last active Oct 14, 2019
Global Terrorism Database
View 1-load_gtdb_script.cql
//load Global Terrorism Database
//Copy/Paste the load script below into your Neo4j-shell command-line utility
//In order to accelerate the loading process, you want to download the CSV file from
//https://www.dropbox.com/s/oequ58lrp8f9w6v/gtdb_transform.csv?dl=1 and then to a local file.
//After that, you would of course need to replace the URL in all of the queries below, and replace it with
//load csv with headers from "file:/path/to/your/file.csv" as csv
//load the countries
load csv with headers from "https://www.dropbox.com/s/oequ58lrp8f9w6v/gtdb_transform.csv?dl=1
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 ***
View keyvase.md

Keybase proof

I hereby claim:

  • I am rvanbruggen on github.
  • I am rvanbruggen (https://keybase.io/rvanbruggen) on keybase.
  • I have a public key ASDwd7urEf8nfaDTlrdqflg_wBBOd6QBBMOX-4HYFq6mZAo

To claim this, I am signing this object:

View 1 - neo4jknowledgegraph.adoc

The Neo4j Knowledge Graph

Our friends of Neueda have been doing more and more work with Neo4j. One of the artefacts of that work (see their github repo for more info) has been an unbelievably wonderful page called Awesome Neo4j. This is a webpage with links and other resources that can be useful for people doing Neo4j projects - whether you are looking for tips and tricks, developer resources, language bindings, frameworks, visualization solutions, graph algorithm components, etc…​ all kinds of links are on this page…​ Truly great work of all the Contributors. And inspiring at that.

A Google Sheet as the main repository

Based on that work, I have tried to add some additional links that I use/know about on

@rvanbruggen
rvanbruggen / graphtechnologygraph_import.cypher
Last active Aug 20, 2019
Graph Technology Landscape Graph
View graphtechnologygraph_import.cypher
create index on :Node(name);
//load the data in raw form
Load csv with headers from "https://docs.google.com/spreadsheets/u/0/d/17WuC_B8RWzsSS8pw-NtY8qWeFFQGCGnCR5uXmENOFUI/export?format=csv&id=17WuC_B8RWzsSS8pw-NtY8qWeFFQGCGnCR5uXmENOFUI&gid=112267709" as csv
Merge (n:Node {name: csv.Name, type: csv.Type, tags: csv.Tags, link: csv.Link});
// move the 'type' property to a label and remove it as a property, USING APOC (not supported in Graphgist)
MATCH (n:Node)
with n, split(n.type, ",") AS futurelabels
unwind futurelabels as futurelabel
@rvanbruggen
rvanbruggen / importtaxonomy.cql
Last active Aug 1, 2019
Google Product Taxonomy
View importtaxonomy.cql
//Import Google Product Taxonomy
//WITH IDENTIFIERS
//downloaded from https://support.google.com/merchants/answer/1705911
create index on :Cat1(name);
create index on :Cat2(name);
create index on :Cat3(name);
create index on :Cat4(name);
create index on :Cat5(name);
create index on :Cat6(name);
@rvanbruggen
rvanbruggen / beer_graph.adoc
Last active Jul 2, 2019
BeerGraphGuide into Neo4j Browser
View beer_graph.adoc

Playing the Belgian Beer Graph into the Neo4j Browser!

For the past couple of years, I have been preaching the Neo4j gospel in many different places, meetups, conferences, and what have you. For the most part, I have been using a very specific demo that has been super well-received: The Belgian Beer Graph. It started out as a learning experience for me personally back in the day when Neo4j did not have any proper data import functionality - and I had to load the graph by jumping through all kinds of hoops.

belgian beers

And now: we can play this demo straight into the Neo4j browser. Such JOY!

@rvanbruggen
rvanbruggen / beergist.adoc
Last active Jul 1, 2019
Creating a beergraph straight from wikipedia
View beergist.adoc

Belgian Beer Graph - straight from Wikipedia into a GraphGist

For the past couple of years, I have been preaching the Neo4j gospel in many different places, meetups, conferences, and what have you. For the most part, I have been using a very specific demo that has been super well-received: The Belgian Beer Graph. It started out as a learning experience for me personally back in the day when Neo4j did not have any proper data import functionality - and I had to load the graph by jumping through all kinds of hoops.

belgian beers
You can’t perform that action at this time.