15 Seconds of Game
Plus an interview with someone who knows that the best data is the publicly available kind
G’day F5 readers. In this week’s newsletter I look at how teams perform every 15 seconds of game time. Then, I talk with Saiem Gilani, founder of the SportsDataverse, about his love for building data pipelines.
As a reminder, The F5 exists because of the support I receive from readers like you. If you want to receive an extra email a week with more charts and analysis (plus tutorials on how to create the data visualizations below) consider upgrading to a paid subscription.
In last week’s newsletter I touched on the idea of how single numbers like Net Rating can obscure the details that make a team interesting. Today, I want to expand on that theme with the chart1 below, which shows each team’s average point differential every 15 seconds of game time.
Who’s building leads and maintaining them? Who’s coming back in the fourth quarter? Who’s giving up before the game even starts?
There’s 30 different stories to tell from looking at this chart, but I’ll just highlight a few.
The Nuggets have been my most disappointing team this season. If it weren’t for Nikola Jokic going 2018 LeBron Mode this past week we might be talking about them as a potential blow it up candidate. What stands out in the Nuggets’ chart is the dramatic dip in point differential beginning in the second quarter. That dip corresponds exactly to when Jokic checks out of the game for the first time. You can see from Jokic’s stints this season that head coach Michael Malone is pushing Jokic’s first quarter minutes to the max. A trade seems inevitable for the Nuggets, but with little to offer in the way of draft assets, their best option might be trading their problem for someone else’s. Zach LaVine for Michael Porter Jr. and filler, anyone?
The Grizzlies are the team I’ve been most surprised by this season. At the beginning of the year, I would have thought Taylor Jenkins was more likely to finish as the first coach fired than the Coach of the Year. Now the Grizzlies are 2nd in the Western Conference and getting quality production from unheralded players like Jay Huff, Jaylen Wells, and Scottie Pippen Jr. If you’re a Memphis skeptic you might look at this chart and point to the downward curve in the fourth quarter (the Grizzlies are 26th in fourth quarter point differential). Is that merely the Rubber Band Effect at work? Or is it indicative of some kind of fatal flaw in this Grizzlies team?
The Magic are one of the few teams that pick up steam as the game goes on. When everyone else is slowing down, they’re powering up. Unfortunately, they’ve been bit by the injury bug of late with Franz Wagner sustaining a core muscle injury, similar to one that’s been sidelining Paolo Banchero since the end of October. The Magic are first in fourth quarter point differential, but that might not last long with the injuries to their cornerstone players.
The Warriors are back to their old ways of dominating the start of the second half. The Warriors are 2nd in third quarter point differential, behind only the Knicks. Some of that’s three-point luck (they’re shooting 43% from three in third quarters while their opponents are shooting just 31%), but it’s not all luck when Steph Curry is on your roster. Curry is averaging just 23 points a game, which ranks 27th in the league this season. But in third quarters, Curry has the league’s fourth highest scoring average and is shooting better than 50% from beyond the arc.
The Wizards aren’t fucking around. This is how you tank. Straight ass from the moment the ball is tipped. The Wizards have three wins this season. Two of those three were the Wizards’ least attended games this season.
A Refreshing Interview with Saiem Gilani, founder of the SportsDataverse
Saiem Gilani is a born and raised Florida Man (Tallahassee, to be specific) and his life’s work is to make things easier for anyone that has to work with data.
Gilani is currently the Head of Data at AthlyticZ, a sports analytics education platform. Before that he spent time with the Houston Rockets, Swish Analytics, and Hawk-Eye Innovations.
I first became familiar with Gilani through his work on the SportsDataverse. The SportsDataverse is a community-driven effort to make it simple to access and analyze data from various professional sports leagues. I rely on its NBA package, hoopR, for much of the analysis you find in this newsletter.
I asked Gilani about the origins of the SportsDataverse, the rumors of the NBA shutting off public access to their data, and whether he’d take Scottie Barnes first overall in a redraft.
This Q&A has been edited for length and clarity.
F5: How did the SportsDataverse come about?
SG: During my last semester at Georgia Tech, I had the experience of working on a college football R package called cfbscrapR , a sister project to the nflscrapR package with Parker Fleming and Meyappan Subbiah. It was an eye-opening experience to create something and put it into the public and deal with users. There is definitely a learning curve when you’re figuring out so much on the fly. The good news is that you get served humble pie often, and I needed many servings. After we had wrapped what felt like the hundredth iteration of what would eventually become cfbfastR, I wanted to work on basketball, my first love.
That’s when I started work on what would eventually be hoopR. Then I thought I could make WNBA and Women’s college basketball data easily accessible, so I made wehoop.
I realized we could do something a lot bigger than making a couple of packages. We could spearhead the effort to ensure these useful resources remain functional, thus serving as public utilities for aspiring industry members.
Do you have a favorite hoopR function?
This is not a cool guy answer, all this does is load the schedule for the selected season of the league you are interested in. It is a very efficient way for me to check if the data scraping from the previous night has successfully run and what data it has (i.e. does this specific game have play-by-play data for this game, does it have the box scores).
My other favorite is one I did not write — nba_pbps(). You just give it a vector of NBA API game_id’s and it will go to work giving you the play-by-play with lineups. The programmer in me is saying “you basically made a for loop into a function”, but the chill guy part of me says “it’s practical and therefore good.”
Do you know how many people have volunteered their time to help build the SportsDataverse that have gone on to work for a professional sports team?
So many. Not all strictly went to work for a team, given that there are plenty of good opportunities at stats providers and media organizations. If you ever wonder why your favorite package in the SportsDataverse is not getting updated as much, it is probably because they got hired to work in sports and are busy.
How can interested people get involved in the SportsDataverse?
The most reliable way to become my friend is for you to see an issue with a package, suggest a fix and give me a Pull Request to help solve the problem. You’re 100% of the time getting an invitation to join the SportsDataverse community.
If you just want to support us in our work with a donation, we very much appreciate those too (https://ko-fi.com/sportsdataverse)
I’ve heard rumors that the NBA has plans to restrict public access to a lot of their data (at least through their APIs) at some point in the near future. Why is it important for the data to remain publicly available?
It is so vital for the open-source NBA analytics community. There are so many good ideas and good people that are discovered from the open-source space.
It also benefits the players and teams to have people interested in their stats and maintaining them in a public space for anyone to see. It can help them negotiate their contracts. It can help front offices find analysts. It can help the league itself identify and address areas of fan interest. There is just so much upside to the endeavor of providing public access to data.
Are there any stats the NBA isn't tracking (or maybe they are and just haven’t made them public) that you wish you had access to?
I think there are a handful that only certain companies or the league itself are working on and have not released. Smart ones will try to improve bio-mechanics, see if they can figure out fatigue and wear and tear. Others will try to figure out who is practicing good technique (or more like, figuring out what looks like good technique in tracking data). I think Second Spectrum had the right ideas on bringing their markings back down to the practical schematics of NBA play types. There is still room for refinement and improvement/expansion given the new skeletal tracking data.
The scale of the data is quite large and frankly, you must have a commitment to spend on your cloud budget/infrastructure/engineering team in order to gain the most you can out of the data. This is a money and math problem in my estimation, at least at the start of this race.
What was your experience working for the Houston Rockets like?
Working directly with a team was a rewarding experience. You learn a lot by being around a franchise and taking part in conversations that are interesting. It reinforced one of the more important core ideas, which is that you should attempt to quantify and be comfortable speaking on uncertainty.
The Rockets were early on the analytics revolution, and it showed. I found I was working on and maintaining things from folks that became assistant GMs and heads of basketball analytics all across the league.
I know you’re an FSU guy. Are you taking Scottie first overall in a redraft?
Over the three players selected ahead of him (Cunningham, Green, Mobley)? Yes. Cunningham and Mobley are easier positional fits and already are budding stars, but I believe there is significant value to the defensive versatility that Scottie Barnes provides to roster construction.
The couple of guys that give me second thoughts are Franz Wagner and Alperen Sengun. Franz has been ascending since Paolo went down this season, and all the metrics seem to favor him. Sengun has been turning in some solid performances and is a full year younger than both. It’s a tougher call than it was on draft night.
Whats one thing you can’t live without during the NBA season?
Taylor Snarr’s website, dunksandthrees.com is one of the best simple and snappy websites from a software engineering perspective. I have made cool things that I am proud to have done but I still aspire to make a site as clean as that. It’s so simple and good!
Every time I look at Bball Index and Krishna Narsu’s work in building out metrics and applications for the site, I am impressed with the thoroughness of how it basically incorporates many common ideas in the public — so many useful metrics and it weaves in its own new ideas. I might prefer it as my first resource when I do not know as much about a player.
Also, not strictly NBA, but I like Evan Miya’s men’s college basketball website.
This chart is a ripoff of a Sebastian Carl original. Carl is an NFL guy but his work inspires me a lot. Pro-tip to anyone interested in dipping their toes in the sports analytics space: find something interesting that someone is doing in a sport different than the one you follow and try to apply it the one you do follow.
"Pro-tip to anyone interested in dipping their toes in the sports analytics space: find something interesting that someone is doing in a sport different than the one you follow and try to apply it the one you do follow."
Dusting off my blogging fingers and I did the same thing just last week!
Love your work, thanks as always Owen.
https://barstonpeter.blogspot.com/2024/12/diamond-plots-and-diamonds-in-rough.html
Love that you can see the moment where Anthony Gill comes of the bench and hits an uncontested jumper in the last moments of a game where the other team stopped trying (because they were up by 15+) against the Wiz