dcayton commited on
Commit
6b5c894
1 Parent(s): 6f92d26

add some features in again

Browse files
Files changed (1) hide show
  1. nba_tracking_data_15_16.py +46 -46
nba_tracking_data_15_16.py CHANGED
@@ -88,44 +88,44 @@ 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"),
115
- # # datasets.Value("float32"),
116
- # # datasets.Value("float32"),
117
- # # datasets.Value("null"),
118
- # # datasets.Sequence(
119
- # # datasets.Sequence(
120
- # # datasets.Value("int64"),
121
- # # datasets.Value("int64"),
122
- # # datasets.Value("float32"),
123
- # # datasets.Value("float32"),
124
- # # datasets.Value("float32")
125
- # # )
126
- # # )
127
- # # )
128
- # )
129
  # }
130
  # )
131
  }
@@ -198,12 +198,12 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
198
  yield moment_id, {
199
  "gameid": game_id,
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,
@@ -212,8 +212,8 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
212
  # "y": y,
213
  # "z": z
214
  # }
215
- # }
216
- # }
217
  }
218
 
219
 
 
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"),
115
+ # datasets.Value("float32"),
116
+ # datasets.Value("float32"),
117
+ # datasets.Value("null"),
118
+ # datasets.Sequence(
119
+ # datasets.Sequence(
120
+ # datasets.Value("int64"),
121
+ # datasets.Value("int64"),
122
+ # datasets.Value("float32"),
123
+ # datasets.Value("float32"),
124
+ # datasets.Value("float32")
125
+ # )
126
+ # )
127
+ # )
128
+ )
129
  # }
130
  # )
131
  }
 
198
  yield moment_id, {
199
  "gameid": game_id,
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,
 
212
  # "y": y,
213
  # "z": z
214
  # }
215
+ }
216
+ }
217
  }
218
 
219