dcayton commited on
Commit
8d8d175
1 Parent(s): ff1d1f1

ensure all features work together

Browse files
Files changed (1) hide show
  1. 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
- # "visitor": {
66
- # "name": datasets.Value("string"),
67
- # "teamid": datasets.Value("int64"),
68
- # "abbreviation": datasets.Value("string"),
69
- # "players": [
70
- # {
71
- # "lastname": datasets.Value("string"),
72
- # "firstname": datasets.Value("string"),
73
- # "playerid": datasets.Value("int64"),
74
- # "jersey": datasets.Value("string"),
75
- # "position": datasets.Value("string")
76
- # }
77
- # ]
78
- # },
79
- # "home": {
80
- # "name": datasets.Value("string"),
81
- # "teamid": datasets.Value("int64"),
82
- # "abbreviation": datasets.Value("string"),
83
- # "players": [
84
- # {
85
- # "lastname": datasets.Value("string"),
86
- # "firstname": datasets.Value("string"),
87
- # "playerid": datasets.Value("int64"),
88
- # "jersey": datasets.Value("string"),
89
- # "position": datasets.Value("string")
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
- # "visitor": {
194
- # "name": visitor_name,
195
- # "teamid": visitor_team_id,
196
- # "abbreviation": visitor_abbrev,
197
- # "players": visitor_players
198
- # },
199
- # "home": {
200
- # "name": home_name,
201
- # "teamid": home_team_id,
202
- # "abbreviation": home_abbrev,
203
- # "players": home_players
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,