Skip to content

Instantly share code, notes, and snippets.

@jjaderberg
Forked from davidoliverSP2/nfl_draft_light.adoc
Last active May 11, 2017 16:12
Show Gist options
  • Save jjaderberg/89a0a9b1d17cbea0a77a82f34d1be7db to your computer and use it in GitHub Desktop.
Save jjaderberg/89a0a9b1d17cbea0a77a82f34d1be7db to your computer and use it in GitHub Desktop.

The 2016 NFL Draft

Introduction

The NFL Draft is an annual event, where young football players at the end of their College careers are selected by the professional NFL teams. Every year, the first overall pick is allocated to the NFL team with the worst record from the previous season. At the end of the 1st round, the reigning champions finally get to make their selection.

There are 32 professional teams in the NFL, so each round in the draft consists of 32 selections. To add an extra twist, the NFL teams can use their picks as currency, trading up and down the draft board. In any given draft, you can find NFL teams with 2 or 3 picks in the first couple of rounds - they will have traded places with other teams; sometimes for better selections, sometimes to move down the draft and gain more picks, or sometimes by trading away existing players for extra picks.

This GraphGist uses the top 10 picks from the 2016 NFL Draft, to demonstrate how GraphGist can visualise the relationships between players, their colleges, and the conferences in which they played. A further extension to this would be to load the entire draft dataset, from which we could map which teams selected the most players, who the fewest, and find patterns in the positions of players selected.

LpuySHN

This domain model diagram was created with the Arrows tool

Setup

//players
CREATE (jaredgoff:Player { name : "Jared Goff", pick: 1, position: "QB" })
CREATE (carsonwentz:Player { name : "Carson Wentz", pick :2, position: "QB" })
CREATE (joeybosa:Player { name : "Joey Bosa", pick :3, position :"DE" })
CREATE (ezekielelliott:Player { name : "Ezekiel Elliott", pick :4, position :"RB" })
CREATE (jalenramsey:Player { name : "Jalen Ramsey", pick :5, position :"CB" })
CREATE (ronniestanley:Player { name : "Ronnie Stanley", pick :6, position :"OT" })
CREATE (deforestbuckner:Player { name : "DeForest Buckner", pick :7, position :"DE" })
CREATE (jackconklin:Player { name : "Jack Conklin", pick :8, position :"OT" })
CREATE (leonardfloyd:Player { name : "Leonard Floyd", pick :9, position :"OLB" })
CREATE (eliapple:Player { name : "Eli Apple", pick :10, position :"CB" })

//colleges
CREATE (california:College {name:"California"})
CREATE (northdakotastate:College {name:"North Dakota State"})
CREATE (ohiostate:College {name:"Ohio State"})
CREATE (floridastate:College {name:"Florida State"})
CREATE (notredame:College {name:"Notre Dame"})
CREATE (oregon:College {name:"Oregon"})
CREATE (michiganstate:College {name:"Michigan State"})
CREATE (georgia:College {name:"Georgia"})

//conferences
CREATE (pac12:College {name:"Pac-12"})
CREATE (mvfc:College {name:"MVFC"})
CREATE (bigten:College {name:"Big Ten"})
CREATE (acc:College {name:"ACC"})
CREATE (indfbs:College {name:"Ind. (FBS)"})
CREATE (sec:College {name:"SEC"})

//player->college
CREATE
(jaredgoff)-[:COLLEGE]->(california),
(carsonwentz)-[:COLLEGE]->(northdakotastate),
(joeybosa)-[:COLLEGE]->(ohiostate),
(ezekielelliott)-[:COLLEGE]->(ohiostate),
(jalenramsey)-[:COLLEGE]->(floridastate),
(ronniestanley)-[:COLLEGE]->(notredame),
(deforestbuckner)-[:COLLEGE]->(oregon),
(jackconklin)-[:COLLEGE]->(michiganstate),
(leonardfloyd)-[:COLLEGE]->(georgia),
(eliapple)-[:COLLEGE]->(ohiostate)

//college->conference
CREATE
(california)-[:CONFERENCE]->(pac12),
(northdakotastate)-[:CONFERENCE]->(mvfc),
(ohiostate)-[:CONFERENCE]->(bigten),
(floridastate)-[:CONFERENCE]->(acc),
(notredame)-[:CONFERENCE]->(indfbs),
(oregon)-[:CONFERENCE]->(pac12),
(michiganstate)-[:CONFERENCE]->(bigten),
(georgia)-[:CONFERENCE]->(sec)
MATCH (player:Player)-[:COLLEGE]->(college:College)
RETURN college.name AS College, collect(player.name) AS Players
ORDER BY College

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