new structure for data
Browse files- nba_tracking_data_15_16.py +29 -23
nba_tracking_data_15_16.py
CHANGED
@@ -89,21 +89,25 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
89 |
}
|
90 |
]
|
91 |
},
|
92 |
-
"
|
93 |
-
"game_clock": datasets.Value("float32"),
|
94 |
-
"shot_clock": datasets.Value("float32"),
|
95 |
-
"ball_coordinates": {
|
96 |
-
"x": datasets.Value("float32"),
|
97 |
-
"y": datasets.Value("float32"),
|
98 |
-
"z": datasets.Value("float32")
|
99 |
-
},
|
100 |
-
"player_coordinates": [
|
101 |
{
|
102 |
-
"
|
103 |
-
"
|
104 |
-
"
|
105 |
-
"
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
]
|
109 |
}
|
@@ -201,13 +205,15 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
201 |
"abbreviation": home_abbrev,
|
202 |
"players": home_players
|
203 |
},
|
204 |
-
"
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
"
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
|
|
|
|
213 |
}
|
|
|
89 |
}
|
90 |
]
|
91 |
},
|
92 |
+
"event_details": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
{
|
94 |
+
"quarter": datasets.Value("int64"),
|
95 |
+
"game_clock": datasets.Value("float32"),
|
96 |
+
"shot_clock": datasets.Value("float32"),
|
97 |
+
"ball_coordinates": {
|
98 |
+
"x": datasets.Value("float32"),
|
99 |
+
"y": datasets.Value("float32"),
|
100 |
+
"z": datasets.Value("float32")
|
101 |
+
},
|
102 |
+
"player_coordinates": [
|
103 |
+
{
|
104 |
+
"teamid": datasets.Value("int32"),
|
105 |
+
"playerid": datasets.Value("int32"),
|
106 |
+
"x": datasets.Value("float32"),
|
107 |
+
"y": datasets.Value("float32"),
|
108 |
+
"z": datasets.Value("float32")
|
109 |
+
}
|
110 |
+
]
|
111 |
}
|
112 |
]
|
113 |
}
|
|
|
205 |
"abbreviation": home_abbrev,
|
206 |
"players": home_players
|
207 |
},
|
208 |
+
"event_details": {
|
209 |
+
"quarter": quarter,
|
210 |
+
"game_clock": game_clock,
|
211 |
+
"shot_clock": shot_clock,
|
212 |
+
"ball_coordinates": {
|
213 |
+
"x": ball_coords_x,
|
214 |
+
"y": ball_coords_y,
|
215 |
+
"z": ball_coords_z
|
216 |
+
},
|
217 |
+
"player_coordinates": player_coords
|
218 |
+
}
|
219 |
}
|