Skip to content

Instantly share code, notes, and snippets.

Shiv’s First Graph Gist - Copy of Peter’s Simple gist.

CREATE (n{name:'India'})-[r:LIKES]->({name:'Spicy Food'}) return n.name, r

Harry Potter

harry

Welcome to the wonderful world of Harry Potter!

v0 of this graph models some of Harrys friends, enemies and their parents. Also have some pets and a few killings. The obvious relation missing is the one between Harry Potter and Voldemort- it took us 7 books to figure that one out, so you’ll have to wait till I add more data :-)

The model

Movie Database

Our example graph consists of movies with title and year and actors with a name. Actors have ACTS_IN relationships to movies, which represents the role they played. This relationship also has a role attribute.

cineasts

We’ll go with three movies and three actors:

How to create a GraphGist

You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page. Alternatively, you can put an AsciiDoc document in Dropbox and enter the public URL in the form.

This GraphGist shows the basics of using AsciiDoc syntax and a few additions for GraphGists. The additions are entered as comments on their own line. They are: //console for a query console; //hide, //setup and //output to configure a query; //graph and //table to visualize queries and show a result table.

Click on the Page Source button in the menu to see the source for this GraphGist.

'gistThat@mcpher.com :do not modify this line - see ramblings.mcpher.com for details: updated on 15/10/2013 10:52:06 : from manifest:5055578 gist https://gist.github.com/brucemcpherson/3423885/raw/cRest.cls
' This is a generalized class for dealing with rest queries
Option Explicit
' v2.12
'for more about this
' http://ramblings.mcpher.com/Home/excelquirks/classeslink/data-manipulation-classes
'to contact me
' http://groups.google.com/group/excel-ramblings
'reuse of code
' http://ramblings.mcpher.com/Home/excelquirks/codeuse
Option Explicit
'for more about this
' http://ramblings.mcpher.com/Home/excelquirks/classeslink/data-manipulation-classes
'to contact me
' http://groups.google.com/group/excel-ramblings
'reuse of code
' http://ramblings.mcpher.com/Home/excelquirks/codeuse
' google rules and api documentation
' http://code.google.com/apis/patentsearch/v1/jsondevguide.html

Harry Potter

harry

Welcome to the wonderful world of Harry Potter!

v0 of this graph models some of Harrys friends, enemies and their parents. Also have some pets and a few killings. The obvious relation missing is the one between Harry Potter and Voldemort- it took us 7 books to figure that one out, so you’ll have to wait till I add more data :-)

The model

= 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.
@shivswami
shivswami / lms-graph
Created December 19, 2013 07:16 — forked from luanne/lms-graph
= Organization Learning
Learning Management Systems (LMS) are typically deployed in large organizations to support learning processes that align with business goals. These systems tie together their employees, organizations, certifications, courses, jobs in order to supplement business strategy.
This graph gist models a slice of this ecosystem- certification paths and position dependencies on certifications.
== Domain
A certification has one or more learning paths. A learning path is an ordered sequence of items that must be completed in order to acquire the certification. A learning item can be completed by taking a course or proving work experience. A course has a delivery type- it can be web based or classroom. Work Experience specifies the number of hours one must put in to complete it.
To aquire a certification, an employee can take take any learning path and complete every item in it.
Employees hold certifications and complete courses and work experience. An employee may fill a position which require