How I created worthwatch.in, a website with excitement rating of past NBA games with no spoilers

A short but dramatic story

Ihar Trafimovich
3 min readOct 21, 2018

The update from 2022: a new website version is available at https://visualized.games/. Finally, it contains all spoilers you need.

worthwatch.in

Problem

Let’s imagine that you live in Europe and you’re interested in basketball. Most NBA games are played late at night for you, so the only way to see them is by watching the replays in the morning. You want to watch the most exciting games without knowing what the final score was.

Also, you don’t want to waste your time watching a boring game, where a result is evident in the second quarter. You won’t miss the seventh game between Golden State and Houston in any case, but choosing from 10 regular season games without spoilers can be problematic.

First steps

Once I asked myself, what if I can calculate some drama rating of every game using powerful NBA API. I tried to figure out a formula, and my first attempt was this:

This formula gave high results for games with impressive comebacks, but it didn’t paint the full picture of what happened in the game.

Later, I found the website wikihoops.com that calculates a game rating somehow. I was somewhat disappointed that someone had already implemented my idea and dropped it for a while. Which wasn’t a problem since it was the off-season.

Solution

In early September I came back to the idea of creating my own little FiveThirtyEight. I did severe research (well, just googled “NBA game excitement”), and found the formula that describes what I need pretty well.

In simple words, a game excitement score is the sum of the win probability changes during the course of a game.

Have a look at a visual representation of the most boring and the most exciting games in 2014–2018:

Feb 07, 2018. Spurs took the lead in the first quarter against Suns and kept it for the whole game. Game Excitement Score: 1.603
Jan 29, 2017. Knicks and Hawks needed four exhausting overtimes to reveal the winner. Game Excitement Score: 15.701

As you can see the game excitement score is an entirely abstract number in the range from 1 to 16. But people like a 10-point scale, so I needed to normalize the score somehow.

I build a game excitement score distribution from the last four seasons of NBA games (excluding preseason and all-star games).

According to that distribution
top-1% games get rating 9.9,
top-2% — 9.8,
top-3% — 9.7…, etc.

So, the dependency between the score and the rating isn’t linear. Games with a rating of 5 will occur as often as games with a rating of 9.

Information for curious tech-savvy people

  • Backend: Node, Express.js, Postgres, Heroku;
  • Frontend: React, Redux, D3, Styled-Components, Github Pages;
  • Font: Space Grotesk;

--

--