# Wolfram Data Repository

Immediate Computable Access to Curated Contributed Data

A graph of Major League Baseball players connected by common teams

Each vertex in the graph represents a player.

Each edge in the graph represents a year in which the two connected players played on the same team.

The data was collected from the roster data at baseball-reference.com.

To avoid ambiguity vertex names are Baseball-Reference player ids, the players names are included as "Player" values in the AnnotationRules.

The team name and year is included in the EdgeTags as a Hyperlink to the corresponding Baseball-Reference page.

The graph has 17,669 edges representing players joined by 2,035,808 edges representing common teams.

(17669 vertices, 2035808 edges)

Get the graph:

In[1]:= |

Out[1]= |

Get twenty random player ids:

In[2]:= |

Out[2]= |

Get their names:

In[3]:= |

Out[3]= |

In[4]:= |

Out[4]= |

Find the players connecting the first two ids randomly chosen above:

In[5]:= |

Out[5]= |

Create a function to write stories about the connection between any two players:

In[6]:= |

In[7]:= |

Out[7]= |

Create random stories:

In[8]:= |

In[9]:= |

Out[9]= |

Wolfram Research, "Major League Baseball Teammate Graph 1900-2019" from the Wolfram Data Repository (2021)

https://www.sports-reference.com/data_use.html