This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CALL apoc.load.json('https://app.ticketmaster.com/discovery/v2/classifications?locale=en-us&apikey={key}') YIELD value AS json | |
UNWIND json._embedded.classifications as classification | |
MERGE (seg:Segment {ticketmaster_id: classification.segment.id, name: classification.segment.name}) | |
WITH seg, classification | |
UNWIND classification.segment._embedded.genres as genre | |
MERGE (gen:Genre {ticketmaster_id: genre.id, name: genre.name}) | |
MERGE (seg)-[:HAS_GENRE]->(gen) | |
WITH seg, gen, genre | |
UNWIND genre._embedded.subgenres as subgenre | |
MERGE (sub:SubGenre {ticketmaster_id: subgenre.id, name: subgenre.name}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function queue(all) { | |
return new Promise((resolve, reject) => { | |
const output = []; | |
next(all.splice(0, 1)) | |
function next(go) { | |
go(); | |
.then(res => { | |
output.push(res); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== Northwind Graph | |
=== Introduction | |
Recently, I was asked to pitch a method for providing recommendations. Luckily, armed with the knowledge obtained from talks from Max De Marzi and [Mark Needham](https://skillsmatter.com/skillscasts/7298-modelling-a-recommendation-engine-a-worked-example) at a recent Neo4j London Meetups, I knew this could be easily achieved with Neo4j. | |
The key issue with recommendation engines comes from the data. Luckily, Neo4j comes bundled with the Northwind Graph Example. The Northwind database is an infamous dataset containing purchase history that has been used to teach relational databases for years and was a great place to start. You can import the Northwind database into a graph by following the ["Import Data into Neo4j"](http://neo4j.com/developer/guide-importing-data-and-etl/) post on Neo4j or type the following into Neo4j's browser at `http://localhost:7474/` | |
:play northwind graph |
NewerOlder