728x90
반응형
[MLB Stats API] 파이썬 패키지로 MLB Stats API 사용해보기
- 요청한 특정 시즌의 경기 속도에 대한 정보 목록을 딕셔너리로 출력
- 기본파라미터로 현재연도가 설정되어 있으나, 해당시즌을 정확히 기입하는 것이 좋음
- 9이닝당 평균안타 / 총 경기시간 / 평균 경기시간 등 여러 데이터 제공
statsapi.game_pace_data(season=2021)
{'copyright': 'Copyright 2022 MLB Advanced Media, L.P. Use of any content on this page acknowledges agreement to the terms posted here http://gdx.mlb.com/components/copyright.txt',
'teams': [],
'leagues': [],
'sports': [{'hitsPer9Inn': 16.68,
'runsPer9Inn': 9.3,
'pitchesPer9Inn': 299.83,
'plateAppearancesPer9Inn': 76.8,
'hitsPerGame': 16.26,
'runsPerGame': 9.06,
'inningsPlayedPerGame': 8.8,
'pitchesPerGame': 292.24,
'pitchersPerGame': 8.87,
'plateAppearancesPerGame': 74.85,
'totalGameTime': '7749:55:59',
'totalInningsPlayed': 21379.5,
'totalHits': 39484,
'totalRuns': 22010,
'totalPlateAppearances': 181818,
'totalPitchers': 21545,
'totalPitches': 709851,
'totalGames': 2429,
'total7InnGames': 118,
'total9InnGames': 2095,
'totalExtraInnGames': 231,
'timePerGame': '03:11:26',
'timePerPitch': '00:00:39',
'timePerHit': '00:11:46',
'timePerRun': '00:21:07',
'timePerPlateAppearance': '00:02:33',
'timePer9Inn': '03:16:24',
'timePer77PlateAppearances': '03:16:55',
'totalExtraInnTime': '871:52:00',
'timePer7InnGame': '02:24:52',
'timePer7InnGameWithoutExtraInn': '253:31:59',
'total7InnGamesScheduled': 121,
'total7InnGamesWithoutExtraInn': 105,
'total9InnGamesCompletedEarly': 7,
'total9InnGamesWithoutExtraInn': 2086,
'total9InnGamesScheduled': 2308,
'hitsPerRun': 1.794,
'pitchesPerPitcher': 32.947,
'season': '2021',
'sport': {'id': 1, 'code': 'mlb', 'link': '/api/v1/sports/1'},
'prPortalCalculatedFields': {'total7InnGames': 118,
'total9InnGames': 2095,
'totalExtraInnGames': 216,
'timePer7InnGame': '02:25:50',
'timePer9InnGame': '03:10:04',
'timePerExtraInnGame': '03:49:32'}}]}
728x90