-
Notifications
You must be signed in to change notification settings - Fork 11
Data Types: Gamepace
KCNilssen edited this page Dec 16, 2022
·
5 revisions
Attributes are expandable and collapsable - Link to Gamepace dataclass
teams : List[Gamepacedata]
- A list of teams in the gamepace. Dataclass: Gamepaceteams
hitsper9inn : float
- The number of hits per 9 innings played.
runsper9inn : float
- The number of runs scored per 9 innings played.
pitchesper9inn : float
- The number of pitches thrown per 9 innings played.
plateappearancesper9inn : float
- The number of plate appearances per 9 innings played.
hitspergame : float
- The number of hits per game played.
runspergame : float
- The number of runs scored per game played.
inningsplayedpergame : float
- The number of innings played per game.
pitchespergame : float
- The number of pitches thrown per game played.
pitcherspergame : float
- The number of pitchers used per game played.
plateappearancespergame : float
- The number of plate appearances per game played.
totalgametime : str
- The total time spent playing games in the league.
totalinningsplayed : float
- The total number of innings played in the league.
totalhits : int
- The total number of hits in the league.
totalruns : int
- The total number of runs scored in the league.
totalplateappearances : int
- The total number of plate appearances in the league.
totalpitchers : int
- The total number of pitchers used in the league.
totalpitches : int
- The total number of pitches thrown in the league.
totalgames : int
- The total number of games played in the league.
total7inngames : int
- The total number of 7-inning games played in the league.
total9inngames : int
- The total number of 9-inning games played in the league.
totalextrainngames : int
- The total number of extra inning games played in the league.
timepergame : str
- The amount of time spent per game in the league.
timeperpitch : str
- The amount of time spent per pitch in the league.
timeperhit : str
- The amount of time spent per hit in the league.
timeperrun : str
- The amount of time spent per run scored in the league.
timeperplateappearance : str
- The amount of time spent per plate appearance in the league.
timeper9inn : str
- The amount of time spent per 9 innings played in the league.
timeper77plateappearances : str
- The amount of time spent per 7-7 plate appearances in the league.
totalextrainntime : str
- The total amount of time spent on extra inning games in the league.
timeper7inngame : str
- The amount of time spent per 7-inning game in the league.
total7inngamescompletedearly: int
- The total number of 7-inning games completed early in the league.
timeper7inngamewithoutextrainn: str
- The amount of time spent per 7-inning game without extra innings in the league.
total7inngamesscheduled : int
- The total number of 7-inning games scheduled in the league.
total7inngameswithoutextrainn : int
- The total number of 7-inning games played without extra innings in the league.
total9inngamescompletedearly : int
- The total number of 9-inning games completed early in the league.
total9inngameswithoutextrainn : int
- The total number of 9-inning games
total9inngamesscheduled : int
- The total number of 9 inning games scheduled
hitsperrun : float
- The number of hits per run
pitchesperpitcher : float
- Number of pitches thrown per pitcher
season : str
- Season number
team: Team
- Team. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- api link of the team
league : League
- League. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
sport : Sport
- Sport. Dataclass: Sport
id : int
- id number of the sport
code : str
- Sport code
link : str
- link of the sport
prportalcalculatedfields : Prportalcalculatedfields
- calculated fields for a league. Dataclass: Prportalcalculatedfields
total7inngames : int
- The total number of 7-inning games played.
total9inngames : int
- The total number of 9-inning games played.
totalextrainngames : int
- The total number of extra-inning games played.
timeper7inngame : str
- The average time per 7-inning game.
timeper9inngame : str
- The average time per 9-inning game.
timeperextrainngame : str
- The average time per extra-inning game.
leagues : List[Gamepacedata]
- A list of leagues in the gamepace. Dataclass: Gamepaceteams
hitsper9inn : float
- The number of hits per 9 innings played.
runsper9inn : float
- The number of runs scored per 9 innings played.
pitchesper9inn : float
- The number of pitches thrown per 9 innings played.
plateappearancesper9inn : float
- The number of plate appearances per 9 innings played.
hitspergame : float
- The number of hits per game played.
runspergame : float
- The number of runs scored per game played.
inningsplayedpergame : float
- The number of innings played per game.
pitchespergame : float
- The number of pitches thrown per game played.
pitcherspergame : float
- The number of pitchers used per game played.
plateappearancespergame : float
- The number of plate appearances per game played.
totalgametime : str
- The total time spent playing games in the league.
totalinningsplayed : float
- The total number of innings played in the league.
totalhits : int
- The total number of hits in the league.
totalruns : int
- The total number of runs scored in the league.
totalplateappearances : int
- The total number of plate appearances in the league.
totalpitchers : int
- The total number of pitchers used in the league.
totalpitches : int
- The total number of pitches thrown in the league.
totalgames : int
- The total number of games played in the league.
total7inngames : int
- The total number of 7-inning games played in the league.
total9inngames : int
- The total number of 9-inning games played in the league.
totalextrainngames : int
- The total number of extra inning games played in the league.
timepergame : str
- The amount of time spent per game in the league.
timeperpitch : str
- The amount of time spent per pitch in the league.
timeperhit : str
- The amount of time spent per hit in the league.
timeperrun : str
- The amount of time spent per run scored in the league.
timeperplateappearance : str
- The amount of time spent per plate appearance in the league.
timeper9inn : str
- The amount of time spent per 9 innings played in the league.
timeper77plateappearances : str
- The amount of time spent per 7-7 plate appearances in the league.
totalextrainntime : str
- The total amount of time spent on extra inning games in the league.
timeper7inngame : str
- The amount of time spent per 7-inning game in the league.
total7inngamescompletedearly: int
- The total number of 7-inning games completed early in the league.
timeper7inngamewithoutextrainn: str
- The amount of time spent per 7-inning game without extra innings in the league.
total7inngamesscheduled : int
- The total number of 7-inning games scheduled in the league.
total7inngameswithoutextrainn : int
- The total number of 7-inning games played without extra innings in the league.
total9inngamescompletedearly : int
- The total number of 9-inning games completed early in the league.
total9inngameswithoutextrainn : int
- The total number of 9-inning games
total9inngamesscheduled : int
- The total number of 9 inning games scheduled
hitsperrun : float
- The number of hits per run
pitchesperpitcher : float
- Number of pitches thrown per pitcher
season : str
- Season number
team: Team
- Team. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- api link of the team
league : League
- League. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
sport : Sport
- Sport. Dataclass: Sport
id : int
- id number of the sport
code : str
- Sport code
link : str
- link of the sport
prportalcalculatedfields : Prportalcalculatedfields
- calculated fields for a league. Dataclass: Prportalcalculatedfields
total7inngames : int
- The total number of 7-inning games played.
total9inngames : int
- The total number of 9-inning games played.
totalextrainngames : int
- The total number of extra-inning games played.
timeper7inngame : str
- The average time per 7-inning game.
timeper9inngame : str
- The average time per 9-inning game.
timeperextrainngame : str
- The average time per extra-inning game.
sports : List[Gamepacedata]
- A list of sports in the gamepace. Dataclass: Gamepaceteams
hitsper9inn : float
- The number of hits per 9 innings played.
runsper9inn : float
- The number of runs scored per 9 innings played.
pitchesper9inn : float
- The number of pitches thrown per 9 innings played.
plateappearancesper9inn : float
- The number of plate appearances per 9 innings played.
hitspergame : float
- The number of hits per game played.
runspergame : float
- The number of runs scored per game played.
inningsplayedpergame : float
- The number of innings played per game.
pitchespergame : float
- The number of pitches thrown per game played.
pitcherspergame : float
- The number of pitchers used per game played.
plateappearancespergame : float
- The number of plate appearances per game played.
totalgametime : str
- The total time spent playing games in the league.
totalinningsplayed : float
- The total number of innings played in the league.
totalhits : int
- The total number of hits in the league.
totalruns : int
- The total number of runs scored in the league.
totalplateappearances : int
- The total number of plate appearances in the league.
totalpitchers : int
- The total number of pitchers used in the league.
totalpitches : int
- The total number of pitches thrown in the league.
totalgames : int
- The total number of games played in the league.
total7inngames : int
- The total number of 7-inning games played in the league.
total9inngames : int
- The total number of 9-inning games played in the league.
totalextrainngames : int
- The total number of extra inning games played in the league.
timepergame : str
- The amount of time spent per game in the league.
timeperpitch : str
- The amount of time spent per pitch in the league.
timeperhit : str
- The amount of time spent per hit in the league.
timeperrun : str
- The amount of time spent per run scored in the league.
timeperplateappearance : str
- The amount of time spent per plate appearance in the league.
timeper9inn : str
- The amount of time spent per 9 innings played in the league.
timeper77plateappearances : str
- The amount of time spent per 7-7 plate appearances in the league.
totalextrainntime : str
- The total amount of time spent on extra inning games in the league.
timeper7inngame : str
- The amount of time spent per 7-inning game in the league.
total7inngamescompletedearly: int
- The total number of 7-inning games completed early in the league.
timeper7inngamewithoutextrainn: str
- The amount of time spent per 7-inning game without extra innings in the league.
total7inngamesscheduled : int
- The total number of 7-inning games scheduled in the league.
total7inngameswithoutextrainn : int
- The total number of 7-inning games played without extra innings in the league.
total9inngamescompletedearly : int
- The total number of 9-inning games completed early in the league.
total9inngameswithoutextrainn : int
- The total number of 9-inning games
total9inngamesscheduled : int
- The total number of 9 inning games scheduled
hitsperrun : float
- The number of hits per run
pitchesperpitcher : float
- Number of pitches thrown per pitcher
season : str
- Season number
team: Team
- Team. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- api link of the team
league : League
- League. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
sport : Sport
- Sport. Dataclass: Sport
id : int
- id number of the sport
code : str
- Sport code
link : str
- link of the sport
prportalcalculatedfields : Prportalcalculatedfields
- calculated fields for a league. Dataclass: Prportalcalculatedfields
total7inngames : int
- The total number of 7-inning games played.
total9inngames : int
- The total number of 9-inning games played.
totalextrainngames : int
- The total number of extra-inning games played.
timeper7inngame : str
- The average time per 7-inning game.
timeper9inngame : str
- The average time per 9-inning game.
timeperextrainngame : str
- The average time per extra-inning game.
Description: Returns a Gamepace
Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
season |
int | Yes | Insert year to return a directory of pace of game metrics for a given season. | None |
Other Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
teamIds |
int | No | Insert a teamIds to return directory of pace of game metrics for a given team. Format '110' or '110,147' | None |
leagueId |
int | No | Insert leagueIds to return a directory of pace of game metrics for a given league. Format '103' or '103,104' | None |
leagueListId |
string | No | Insert a unique League List Identifier to return a directory of pace of game metrics for a specific league listId. | None |
sportId |
int | No | Insert a sportId to return a directory of pace of game metrics for a specific sport. Format '11' or '1,11' | None |
gameType |
string | No | Insert gameType(s) a return a directory of pace of game metrics for a specific gameType. For a list of all gameTypes: | None |
date |
string | No | Insert date to return a directory of pace of game metrics for a particular date range. Format: MM/DD/YYYY !startDate must be coupled with endDate! | None |
endDate |
string | No | Insert date to return a directory of pace of game metrics for a particular date range. Format: MM/DD/YYYY ! endDate must be coupled with startDate ! | None |
venueIds |
int | No | Insert venueId to return a directory of pace of game metrics for a particular venueId. | None |
orgType |
string | No | Insert a orgType to return a directory of pace of game metrics based on team, league or sport. Available values : T- TEAM, L- LEAGUE, S- SPORT | None |
includeChildren |
bool | No | Insert includeChildren to return a directory of pace of game metrics for all child teams in a given parent sport. | None |
fields |
string | No | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attr |
https://statsapi.mlb.com/api/v1/gamePace?season=2018
import mlbstatsapi
mlb = mlbstatsapi.Mlb()
mlb.get_gamepace(season = 2018)
Note: This information is provided for reference only, without warranty or guarantee, and is not official documentation provided by MLB. This package and its author are not affiliated with MLB or any MLB team. This API wrapper interfaces with MLB's Stats API. Use of MLB data is subject to the notice posted at http://gdx.mlb.com/components/copyright.txt.