ensure all features work together
Browse files- nba_tracking_data_15_16.py +40 -41
nba_tracking_data_15_16.py
CHANGED
@@ -60,36 +60,35 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
60 |
{
|
61 |
"gameid": datasets.Value("string"),
|
62 |
"gamedate": datasets.Value("string"),
|
63 |
-
# question: how to indicate list of dictionaries?
|
64 |
"eventid": datasets.Value("string"),
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
"quarter": datasets.Value("int64"),
|
94 |
"game_clock": datasets.Value("float32"),
|
95 |
"shot_clock": datasets.Value("float32"),
|
@@ -190,18 +189,18 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
190 |
"gameid": game_id,
|
191 |
"gamedate": game_date,
|
192 |
"eventid": event_id,
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
"quarter": quarter,
|
206 |
"game_clock": game_clock,
|
207 |
"shot_clock": shot_clock,
|
|
|
60 |
{
|
61 |
"gameid": datasets.Value("string"),
|
62 |
"gamedate": datasets.Value("string"),
|
|
|
63 |
"eventid": datasets.Value("string"),
|
64 |
+
"visitor": {
|
65 |
+
"name": datasets.Value("string"),
|
66 |
+
"teamid": datasets.Value("int64"),
|
67 |
+
"abbreviation": datasets.Value("string"),
|
68 |
+
"players": [
|
69 |
+
{
|
70 |
+
"lastname": datasets.Value("string"),
|
71 |
+
"firstname": datasets.Value("string"),
|
72 |
+
"playerid": datasets.Value("int64"),
|
73 |
+
"jersey": datasets.Value("string"),
|
74 |
+
"position": datasets.Value("string")
|
75 |
+
}
|
76 |
+
]
|
77 |
+
},
|
78 |
+
"home": {
|
79 |
+
"name": datasets.Value("string"),
|
80 |
+
"teamid": datasets.Value("int64"),
|
81 |
+
"abbreviation": datasets.Value("string"),
|
82 |
+
"players": [
|
83 |
+
{
|
84 |
+
"lastname": datasets.Value("string"),
|
85 |
+
"firstname": datasets.Value("string"),
|
86 |
+
"playerid": datasets.Value("int64"),
|
87 |
+
"jersey": datasets.Value("string"),
|
88 |
+
"position": datasets.Value("string")
|
89 |
+
}
|
90 |
+
]
|
91 |
+
},
|
92 |
"quarter": datasets.Value("int64"),
|
93 |
"game_clock": datasets.Value("float32"),
|
94 |
"shot_clock": datasets.Value("float32"),
|
|
|
189 |
"gameid": game_id,
|
190 |
"gamedate": game_date,
|
191 |
"eventid": event_id,
|
192 |
+
"visitor": {
|
193 |
+
"name": visitor_name,
|
194 |
+
"teamid": visitor_team_id,
|
195 |
+
"abbreviation": visitor_abbrev,
|
196 |
+
"players": visitor_players
|
197 |
+
},
|
198 |
+
"home": {
|
199 |
+
"name": home_name,
|
200 |
+
"teamid": home_team_id,
|
201 |
+
"abbreviation": home_abbrev,
|
202 |
+
"players": home_players
|
203 |
+
},
|
204 |
"quarter": quarter,
|
205 |
"game_clock": game_clock,
|
206 |
"shot_clock": shot_clock,
|