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
© . All rights reserved.