dcayton commited on
Commit
43b0998
1 Parent(s): 2f4e7fb

quarter test

Browse files
Files changed (1) hide show
  1. nba_tracking_data_15_16.py +34 -34
nba_tracking_data_15_16.py CHANGED
@@ -88,27 +88,27 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
88
  # "position": datasets.Value("string")
89
  # })
90
  # },
91
- # "moments": datasets.Sequence(
92
- # # question, how to indicate lists of lists of different types
93
- # {
94
- # "quarter": datasets.Value("int64"),
95
- # "game_clock": datasets.Value("float32"),
96
- # "shot_clock": datasets.Value("float32"),
97
- # "ball_coordinates": datasets.Sequence(
98
- # datasets.Value("float32"),
99
- # datasets.Value("float32"),
100
- # datasets.Value("float32")
101
- # ),
102
- # "player_coordinates": datasets.Sequence(
103
- # {
104
- # "teamid": datasets.Value("int64"),
105
- # "playerid": datasets.Value("int64"),
106
- # "x": datasets.Value("float32"),
107
- # "y": datasets.Value("float32"),
108
- # "z": datasets.Value("float32")
109
- # }
110
- # )
111
- # }
112
  # datasets.Sequence(
113
  # datasets.Value("int64"),
114
  # datasets.Value("float32"),
@@ -200,19 +200,19 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
200
  "gamedate": game_date,
201
  "events": {
202
  "eventid": event_id,
203
- # "moments": {
204
- # "quarter": quarter,
205
- # "game_clock": game_clock,
206
- # "shot_clock": shot_clock,
207
- # "ball_coordinates": ball_coords,
208
- # "player_coordinates": {
209
- # "teamid": team_id,
210
- # "playerid": player_id,
211
- # "x": x,
212
- # "y": y,
213
- # "z": z
214
- # }
215
- # }
216
  }
217
  }
218
 
 
88
  # "position": datasets.Value("string")
89
  # })
90
  # },
91
+ "moments": datasets.Sequence(
92
+ # question, how to indicate lists of lists of different types
93
+ {
94
+ "quarter": datasets.Value("int64"),
95
+ # "game_clock": datasets.Value("float32"),
96
+ # "shot_clock": datasets.Value("float32"),
97
+ # "ball_coordinates": datasets.Sequence(
98
+ # datasets.Value("float32"),
99
+ # datasets.Value("float32"),
100
+ # datasets.Value("float32")
101
+ # ),
102
+ # "player_coordinates": datasets.Sequence(
103
+ # {
104
+ # "teamid": datasets.Value("int64"),
105
+ # "playerid": datasets.Value("int64"),
106
+ # "x": datasets.Value("float32"),
107
+ # "y": datasets.Value("float32"),
108
+ # "z": datasets.Value("float32")
109
+ # }
110
+ # )
111
+ }
112
  # datasets.Sequence(
113
  # datasets.Value("int64"),
114
  # datasets.Value("float32"),
 
200
  "gamedate": game_date,
201
  "events": {
202
  "eventid": event_id,
203
+ "moments": {
204
+ "quarter": quarter,
205
+ # "game_clock": game_clock,
206
+ # "shot_clock": shot_clock,
207
+ # "ball_coordinates": ball_coords,
208
+ # "player_coordinates": {
209
+ # "teamid": team_id,
210
+ # "playerid": player_id,
211
+ # "x": x,
212
+ # "y": y,
213
+ # "z": z
214
+ # }
215
+ }
216
  }
217
  }
218