Game Star Ratings

I’ve added a star rating to each game. It measures the “enjoyability” of a game based on a few different factors. There are many elements to a game that can make it enjoyable to the unbiased fan. I’ve tried to include the most important of these.

The rating system ranges from 0 stars to 5 stars and goes in increments of .25 stars. The average game will be around 2.5 stars.

Leverage Index (aLI)
The first and most important element is leverage index, which measures the importance of each situation in the game. The more crucial a moment in a game is to the outcome, the higher the leverage index will be. A leverage index of “1” is average. A leverage index of “3” is equal to three times as important as the average play. FanGraphs has a primer on LI for those interested.

In the game rating formula, I use average leverage index over the course of the entire game. I could have chosen to just go with the top X plays in a game, or the number of plays over a certain threshold, but I felt the average over the course of the game is best suited to gauge the intensity of the entire game.

Win Expectancy Change (WE+/-)
Next is change in win expectancy per play. Suppose an RBI single increases a team’s win expectancy from 55% to 65%. That would obviously be an increase of 10 percentage points. I calculate the average absolute value of WE change over the course of the entire game and use that number for my rating formula.

The average play in the average game will have a win expectancy change of about 3.3 percentage points. Bigger and more exciting plays will increase this number, while plays in blowout games will do the opposite.

Leverage index and win expectancy change very likely have a high correlation, which would cause these elements to be “double counted”. I have taken that into consideration and am fine with it since they are the most important factors in gauging a game’s intensity.

Championship Leverage Index (CLI)
Championship leverage index is similar to in-game leverage index (above), in that it gauges the importance of a single game as opposed to a single play. The game importance is measured in how much a team’s probability of winning the World Series changes in a win versus a loss.

The average game will have a CLI of 1 and is equal to the average game on opening day. In the 2nd Wild Card era (2012-present), the average game on opening day can change a team’s chances of winning the World Series by 0.59 percentage points.

The CLI used in this ratings formula is the average of the two team’s CLI for this game.

Examples: A team that is already eliminated has a 0% chance of winning the World Series. A win will not increase their chances, so their CLI will be 0. The same goes for a team that has already clinched their division. A division title ensures that a team is 1 of the 8 teams in the postseason tournament, meaning they have a 12.5% chance of winning the World Series. A win or a loss after clinching the division will not change this number. But a one-game playoff for the division (game 163) is a “win or go home” scenario and will have a CLI of around 21, since it is 21 times more important than the average game on opening day.

Comeback (CB)
The final element is comeback, which is defined as the highest win expectancy the losing team reached during the game. A comeback can range anywhere from 50 percentage points to 100 percentage points. A comeback of 100 percentage points means that the losing team had a 100% chance of winning, but still managed to lose the game. A comeback of 50 percentage points means the losing team was never able to increase their win expectancy above the 50% level at the beginning of the game and likely means the game was never much in doubt.

Formula and Weights
Each of the four elements (LI, WE+/-, CLI, CB) are individually compared to a large sample of games ranked in a percentile. These percentiles are then weighted and combined to create the star rating. The weights are:
aLI = 1.5
WE+/- = 1.5
CLI = 1
CB = 1

Example: A game has an average leverage index of 1.25, an average win expectancy change of 4.5 percentage points, a championship leverage index of 1.55, and a 85% comeback. Their percentiles and weights are:
aLI = 70 * 1.5
WE+/- = 82 * 1.5
CLI = 92 * 1
CB = 90 * 1

Their sum is 410. This number is divided by 25 and rounded to the nearest whole number. It is finally divided by 4 to give you the star rating. This game would be a 4 star game (410 / 25 = 16.4 = 16 / 4 = 4).

Elements of a game not currently included in star rating system
Individual game performances and milestones. A player hitting 4 HR in a game is exciting and uncommon and makes each of the at bats more important. A pitcher taking a no-hitter or perfect game late into the game has the same effect. These types of elements are currently not included, but are “on the table” for future versions.

Star Players
One could argue that the more superstar players in a game could make it more enjoyable. This rating system does not take the players superstar status or skill level into account.

Special Games
While Derek Jeter’s final home game was exciting in its own right, I would argue that it was even more enjoyable since it was his final game at Yankee Stadium. This rating system doesn’t take these rare situations into account.

The Home Crowd’s Enjoyment
As mentioned above, this star rating measures the enjoyment for the unbiased fan. The home crowd may have a different definition of an enjoyable game based on whether their team wins, but this system makes no such distinction.

2016 Retrosheet Database

One of the best days of every offseason for a baseball nerd is Retrosheet annual end of season release day. It’s the day one of the best sites on the internet releases the play by play data from the previous season. If you’re like me, you download it immediately and go to town. But one thing I’ve always wanted was the ability to access the data during the current season.

So this past offseason, I designed a way to take mlb’s gameday data and convert it into a Chadwick-style retrosheet database. The database (.csv files) will be available and updated daily* in the downloads section. I’m making it available mainly because I know there are others out there, like me, that are interested in having an in-season pbp database. But also because I’d like to have more than one set of eyes on it, to help iron out the kinks and catch any errors.

Error Checking
I run a few processes to check for errors and to validate the data. But there is still the possibility that errors will come up from time to time. I’d like to make this a forum for error reporting, for those who are interested in helping.

Daily Download
Just as with this website, I intend to have updates available daily. Usually, the site is updated in the morning. But with a full-time job and two toddlers at home, there can sometimes be a delay.

Missing columns
There are a few columns in the events table that I have left blank:
“EVENT_TX”: It turns out that it is a huge process to replicate this. While I believe the “EVENT_TX” column is helpful in quickly identifying the play, I don’t use it in my queries and felt it wasn’t worth the hassle. The same goes for the “BAT_PLAY_TX” and the “RUNX_PLAY_TX” columns.

“BATTEDBALL_LOC_TX”: Gameday does include hit locations for all balls in play, but I have yet to dive into this data. If there is someone who has experience with this data and is willing to assist in converting gameday’s x and y coordinates to Project Scoresheet locations codes, please let me know.

“UMP_ID”: These columns for the six umpires are currently left blank.

“GWRBI_BAT_ID”: This is left blank because game winning RBI’s are no longer officially recorded.

ID’s for players making their Major League debut
Since these players have yet to be assigned official ID’s by retrosheet, I just give them the next available ID for their name. For example, if a John Smith were to make a debut, he would be assigned ID “smitj005”, since 005 would be next in line.

Building a Retrosheet Database
For those who are interested in using the data, but lack experience, David Temple at TechGraphs recently created a helpful two part tutorial.

If you find this data useful and have some disposable income, please consider donating. I do not get paid for my work on this website and while it is my passion to work with baseball data, it does take a lot of time and money (server costs) to keep it up. I’d like to also suggest donating to David Smith and the Retrosheet team.