Skip to content

Instantly share code, notes, and snippets.

@jjaderberg
Forked from davidoliverSP2/nfl_draft.adoc
Created May 11, 2017 16:05
Show Gist options
  • Select an option

  • Save jjaderberg/310d0fb0afb2934e50f1c9df790af6b4 to your computer and use it in GitHub Desktop.

Select an option

Save jjaderberg/310d0fb0afb2934e50f1c9df790af6b4 to your computer and use it in GitHub Desktop.
The 2016 NFL Draft

The 2016 NFL Draft

Introduction

REPLACEME: Introductory text and domain model image.

Rr4qZi3

This domain model diagram was created with the Arrows tool

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)

REPLACEME: FIRST USECASE TITLE

MATCH (p:Player)-[:TO]->(t:Team)
RETURN p,t

REPLACEME: SECOND USE-CASE TITLE

MATCH (p:Player)-[:TO]->(t:Team)
RETURN p,t

Conclusions

Resources


Created by David Oliver - Twitter | Blog | LinkedIn

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