Skip to content

Commit 37fc240

Browse files
authored
Update RFC.md
1 parent e1defce commit 37fc240

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

RFC.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ The `TrackingDataContainer` wraps an Apache Arrow table and Kloppy-style metadat
4747
Packages access the container via a consistent interface, with optional access to Arrow, Polars LazyFrames, or NumPy arrays.
4848

4949
```python
50+
51+
# Option 1:
5052
container = kloppy.load_as_container("data.json", "metadata.json")
5153

52-
# or:
54+
# Option 2:
5355
from kloppy import secondspectrum
5456
container = secondspectrum.load(...normal arguments..., as_container=True)
5557

56-
# or container must be fully backwards compatible (best option)
58+
# Option 3: container is full backwards compatible and can be used in any code that uses TrackingDataset <- Best option!
59+
from kloppy import secondspectrum
60+
dataset = secondspectrum.load(...normal arguments...)
5761

5862
# Add ball speed
5963
container.add_metric("ball_speed", expression="sqrt((ball.x - ball.x.shift(1))**2 + ...)", engine="polars")

0 commit comments

Comments
 (0)