It was nearly two decades ago when a computer scientist named Larry Coon thought it would be fun to read a long, dense, arcane document that requires years of intensive study to fully understand: the NBA’s collective-bargaining agreement.

He didn’t realize he was about to revolutionize the way basketball fans understand the game.

Coon became...