You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The general outline of this implementation should follow the existing American Football (BigDataBowl) implementation, because it has a Polars back-end.
Create a basketball folder in unravel
Create a BasketballDataset class that supports both a string parameter to directly load a single 7zip file from the specified url, and a game identifier (in the repository they use Celtics@Lakers for example, not sure if this is optimal if we want to load all games, one by one).
This dataset class should help us load the data with Polars (see BigDataBowlDataset) and internally convert it to the correct format, and field dimensions. This requires a BasketballPitchDimensions class.
It also requires a row-wise Polars dataframe with a similar structure to the BigDataBowl data (ie, 1 row per player, per frame with game_id, frame_id, team, player, x, y at a minimum).
I'm not exactly sure what variables are available in the existing dataset, so we might need to add speed, vx, vy or direction of travel, team in possession or a way to infer the closest player to the ball as we do in the soccer converter etc. It doesn't have to follow the exact formatting of the BigDataBowl dataset, but it's a good reference point.
Finally we'd need a BasketballGraphConverter class to help us convert into Graphs. Again, this requires a similar approach as the AmericanFootballGraphConverter. Perhaps some parts can be refactored into a parent class.
Add the relevant imports to the relevant __init__.py files
Add tests for all functionality see the tests folder for reference.
This implementation requires some research into the existing code, because I don't know if the data has on-ball events that might be useful for label creation, an attacking team flag etc.
The text was updated successfully, but these errors were encountered:
UnravelSports
changed the title
[Implemenatation Idea] 🏀 Add NBA tracking data support
[Idea] 🏀 Add NBA tracking data support
Oct 25, 2024
UnravelSports
changed the title
[Idea] 🏀 Add NBA tracking data support
🌀 Add NBA tracking data support
Oct 25, 2024
🏀 Add NBA tracking data support
The NBA-Player-Movements repository contains a full seasons' worth of NBA tracking data.
The general outline of this implementation should follow the existing American Football (BigDataBowl) implementation, because it has a Polars back-end.
unravel
Celtics@Lakers
for example, not sure if this is optimal if we want to load all games, one by one).load
the data with Polars (see BigDataBowlDataset) and internally convert it to the correct format, and field dimensions. This requires a BasketballPitchDimensions class.I'm not exactly sure what variables are available in the existing dataset, so we might need to add speed, vx, vy or direction of travel, team in possession or a way to infer the closest player to the ball as we do in the soccer converter etc. It doesn't have to follow the exact formatting of the BigDataBowl dataset, but it's a good reference point.
BasketballGraphConverter
class to help us convert into Graphs. Again, this requires a similar approach as theAmericanFootballGraphConverter
. Perhaps some parts can be refactored into a parent class.__init__.py
filesThis implementation requires some research into the existing code, because I don't know if the data has on-ball events that might be useful for label creation, an attacking team flag etc.
The text was updated successfully, but these errors were encountered: