GraphGists

2016年美国职业棒球大联盟自由球员图

我使用了FanGraphs的2016年自由球员追踪器来获取有关当前自由球员及其新合同的数据。该图包含截至2015年12月16日签订的合同。

我的数据模型以David Price为例,他与波士顿红袜队签署了一份创纪录的七年2.17亿美元的合同。

wYcFHZB

用例

拥有新合同的球员前10名年薪

MATCH (p:Player)-[:NEW_CONTRACT]->(c:Contract) RETURN p.name,c.salary as Total,c.years as Years,c.salary/c.years as Annual order by Annual desc limit 10

拥有新合同的球员按分区划分的年薪平均值

MATCH (l:League)-[:HAS_DIVISION]–>(d:Division)-[:MEMBER]-(:Team)<-[:SEASON2016]-(p:Player)-[:NEW_CONTRACT]->(c:Contract) WHERE c.years is not null and c.salary is not null RETURN d.name, AVG(c.salary/c.years) as AnnualAvg order by AnnualAvg desc limit 10

拥有新合同的最年长球员

MATCH (p:Player)-[:NEW_CONTRACT]-(c:Contract) RETURN p.name as Name, p.age as Age, c.years as Years order by Age desc limit 10;

各球队与自由球员签订合同的金额

MATCH (l:League)-[:HAS_DIVISION]–>(d:Division)-[:MEMBER]-(t:Team)<-[:SEASON2016]-(p:Player)-[:NEW_CONTRACT]->(c:Contract) WHERE c.years is not null and c.salary is not null RETURN t.name as Team, SUM(c.salary) as Money order by Money desc limit 10