DB

MLB Scorigami

Lahman's Baseball database includes over 200,000 baseball games from 1871-2017. In this fun project I wanted to visualize the frequency of occurrence of each possible score outcome. For the sake of this visual I considered the home team winning 5-3 to be different than the visiting team winning 5-3.

The x axis (top) is the home team and the y axis (left) is the visitors side. I used a logarithmic axis in order to visualize the difference between small numbers while allowing for some very large frequencies. This comes at the expense of differentation of some of the larger values.

Play with the range slider to see the frequencies in different eras. Or switch to viewing a single season instead of a range to compare different years.

View

View MLB Scorigami

Code

View the code on GitHub

Prior Art

The idea was lifted from Jon Bois' work at SBNation. Here is the original article. An analogous site for the NFL is maintined by Andrew Merriman here. The MLB chart had in large part previously been created (independently of my knowledge) by @MLBRandomStats.