Skip to content

Instantly share code, notes, and snippets.

@jjaderberg
Forked from jexp/graph_gist_template.adoc
Last active April 13, 2017 09:35
Show Gist options
  • Save jjaderberg/e679531502add9ebf5a2b8dda2110aba to your computer and use it in GitHub Desktop.
Save jjaderberg/e679531502add9ebf5a2b8dda2110aba to your computer and use it in GitHub Desktop.
CHANGEME: GraphGist Template. Fork to make your own, view source to see instruction comments

REPLACEME: TITLE OF YOUR GRAPHGIST

Introduction

REPLACEME: Introductory text and domain model image.

5giAsjq

Setup

LOAD CSV WITH HEADERS FROM 'https://gist.githubusercontent.com/davidoliverSP2/716ed3b7155efbe78b5bd41d4c3c523a/raw/bcba24649549b58f44563766cba39bdb8ba2931b/draft_data.csv' AS line
MERGE (p:Player {name: line.Player}) ON CREATE SET p.DraftPosition = toInt(line.`Draft Position`)
MERGE (r:Round {id: line.Round})
MERGE (t:Team {name: line.Team})
MERGE (s:Position {name: line.Position})
MERGE (l:College {name: line.College})
MERGE (n:Conference {name: line.Conference})
CREATE (p)-[:POSITION_IS]->(s)
CREATE (p)-[:TO]->(t)
CREATE (p)-[:FROM]->(l)
CREATE (p)-[:PICKED_IN]->(r)
CREATE (p)-[:PLAYED_IN]->(n)
CREATE (l)-[:PLAYS_IN]->(n)
CREATE (t)-[:SELECTION]->(r)
MATCH (player:Player)-[to:TO]-(team:Team)
RETURN player, to, team

REPLACEME: FIRST USECASE TITLE

MATCH (a:Person {name: 'Alice'})-[:FRIENDS_WITH]-(:Person)-[:FRIENDS_WITH]-(fof:Person)
RETURN fof.name as fof, count(*) as frequency

REPLACEME: SECOND USE-CASE TITLE

MATCH path=(a:Person {name: 'Alice'})-[:FRIENDS_WITH]-(:Person)-[:FRIENDS_WITH]-(fof:Person)
RETURN path, a, fof

REPLACEME: THIRD USE-CASE TITLE

Conclusions

REPLACEME: Offer a conclusion

Resources

REPLACEME: Link to resorces like data sources, further discussions,


Created by YOUR NAME - Twitter | Blog | LinkedIn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment