-
Notifications
You must be signed in to change notification settings - Fork 15
Shots
Patrick McFarlane edited this page Feb 10, 2020
·
2 revisions
This section details all endpoints accessible via the Shots
class in wnba_shots.py. Endpoints available include:
Endpoint | Description |
---|---|
pbp | Game play-by-play with basic fields, such as play description, score, period, and game time |
The Shots
endpoints all share the same parameters:
Class Param | Definition | Valid Values | Required |
---|---|---|---|
game_id | 10-digit string that represents a unique game. The format is two leading digits ('10'), followed by a season indicator number ('1' for preseason, '2' for regular season, '4' for the post-season), then the trailing digits of the season in which the game took place (e.g. '17' for the 2017 season). The following 5 digits increment from '00001' in order as the season progresses. For example, '1021600001' is the game_id of the first game of the 2016 WNBA regular season. | Yes | |
season | String of a one-year season in a YYYY format. For example, '2017' is a valid value of season and represents the 2017 WNBA season. | String of positive integer corresponding to a year | Yes |
The following table contains features returned in the pbp
table:
Column | Definition |
---|---|
cl | Game time remaining in the period in MM:SS format |
de | Play description |
epid | Player ID of the "extra" player (assisting player or player subbed in, for example) |
etype | Event type indicators. Viewing the above seems to indicate that a 1 is a made shot, 2 is a missed shot, 3 is a free throw, 4 is a rebound, 5 is a turnover, 6 is a foul, 7 is a team violation, 8 is a substitution, 9 is a timeout, 10 is a jump ball, 12 is the start of a period, 13 is the end of a period, 20 is a stoppage |
evt | Increasing integer indicating the order of events that occur in a game |
hs | Home team score |
locX | x-location of an on-court action |
locY | y-location of an on-court action |
mtype | Integer encoding the type of description on a play |
oftid | Team ID of the offensive team |
opid | Player ID of the player on the "opposing" team (opposing the player in pid) |
pid | Player ID of the main actor on a play |
tid | Team ID of the main actor on a play |
vs | Visiting team score |