brief test comments
Browse files- nba_tracking_data_15_16.py +83 -83
nba_tracking_data_15_16.py
CHANGED
@@ -61,73 +61,73 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
61 |
"gameid": datasets.Value("string"),
|
62 |
"gamedate": datasets.Value("string"),
|
63 |
# question: how to indicate list of dictionaries?
|
64 |
-
"events": datasets.Sequence(
|
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 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
)
|
131 |
}
|
132 |
)
|
133 |
|
@@ -196,22 +196,22 @@ class NbaTracking(datasets.GeneratorBasedBuilder):
|
|
196 |
yield game_id, {
|
197 |
"gameid": game_id,
|
198 |
"gamedate": game_date,
|
199 |
-
"events": {
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
}
|
215 |
}
|
216 |
|
217 |
|
|
|
61 |
"gameid": datasets.Value("string"),
|
62 |
"gamedate": datasets.Value("string"),
|
63 |
# question: how to indicate list of dictionaries?
|
64 |
+
# "events": datasets.Sequence(
|
65 |
+
# {
|
66 |
+
# "eventid": datasets.Value("string"),
|
67 |
+
# # "visitor": {
|
68 |
+
# # "name": datasets.Value("string"),
|
69 |
+
# # "teamid": datasets.Value("int64"),
|
70 |
+
# # "abbreviation": datasets.Value("string"),
|
71 |
+
# # "players": datasets.Sequence({
|
72 |
+
# # "lastname": datasets.Value("string"),
|
73 |
+
# # "firstname": datasets.Value("string"),
|
74 |
+
# # "playerid": datasets.Value("int64"),
|
75 |
+
# # "jersey": datasets.Value("string"),
|
76 |
+
# # "position": datasets.Value("string")
|
77 |
+
# # })
|
78 |
+
# # },
|
79 |
+
# # "home": {
|
80 |
+
# # "name": datasets.Value("string"),
|
81 |
+
# # "teamid": datasets.Value("int64"),
|
82 |
+
# # "abbreviation": datasets.Value("string"),
|
83 |
+
# # "players": datasets.Sequence({
|
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 |
+
# "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 |
}
|
132 |
)
|
133 |
|
|
|
196 |
yield game_id, {
|
197 |
"gameid": game_id,
|
198 |
"gamedate": game_date,
|
199 |
+
# "events": {
|
200 |
+
# "eventid": event_id,
|
201 |
+
# "moments": {
|
202 |
+
# "quarter": quarter,
|
203 |
+
# "game_clock": game_clock,
|
204 |
+
# "shot_clock": shot_clock,
|
205 |
+
# "ball_coordinates": ball_coords,
|
206 |
+
# "player_coordinates": {
|
207 |
+
# "teamid": team_id,
|
208 |
+
# "playerid": player_id,
|
209 |
+
# "x": x,
|
210 |
+
# "y": y,
|
211 |
+
# "z": z
|
212 |
+
# }
|
213 |
+
# }
|
214 |
+
# }
|
215 |
}
|
216 |
|
217 |
|