[MLB Stats API] statsapi.game_pace(season=datetime.now().year, sportId=1)

2022. 1. 10. 14:14·Minding's Baseball/MLB Statcast
728x90
반응형

[MLB Stats API] 파이썬 패키지로 MLB Stats API 사용해보기

 

[MLB Stats API] 파이썬 패키지로 MLB Stats API 사용해보기

Fangraph나 MLB savant 홈페이지에서 직접 csv, DB파일을 다운로드 받는 것이 아닌 MLB서버에 연결된 API로 손쉽게 데이터를 구할 수 있는 방법을 야구공작소 글을 보며 알게되었다. 그 중 파이썬으로 API

minding-deep-learning.tistory.com


  • 요청한 특정 시즌의 경기 속도에 대한 정보 목록 출력
  • 기본파라미터로 현재연도가 설정되어 있으나, 해당시즌을 정확히 기입하는 것이 좋음
  • 9이닝당 평균안타 / 총 경기시간 / 평균 경기시간 등 여러 데이터 제공
# MLB 2021시즌의 게임 페이스에 대한 정보들

print(statsapi.game_pace(2021))
>>>
2021 Game Pace Stats
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
total7InnGames: 118
total9InnGames: 2095
totalExtraInnGames: 216
timePer7InnGame: 02:25:50
timePer9InnGame: 03:10:04
timePerExtraInnGame: 03:49:32
728x90

'Minding's Baseball > MLB Statcast' 카테고리의 다른 글

[MLB Stats API] statsapi.last_game(teamId)  (0) 2022.01.10
[MLB Stats API] statsapi.game_scoring_plays(gamePk)  (0) 2022.01.10
[MLB Stats API] statsapi.game_highlights(gamePk)  (0) 2022.01.10
[MLB Stats API] statsapi.boxscore(gamePk, battingBox=True, battingInfo=True, fieldingInfo=True, pitchingBox=True, gameInfo=True, timecode=None)  (2) 2022.01.10
[MLB Stats API] statsapi.notes(endpoint)  (0) 2022.01.08
'Minding's Baseball/MLB Statcast' 카테고리의 다른 글
  • [MLB Stats API] statsapi.last_game(teamId)
  • [MLB Stats API] statsapi.game_scoring_plays(gamePk)
  • [MLB Stats API] statsapi.game_highlights(gamePk)
  • [MLB Stats API] statsapi.boxscore(gamePk, battingBox=True, battingInfo=True, fieldingInfo=True, pitchingBox=True, gameInfo=True, timecode=None)
Minding
Minding
  • Minding
    Today's Minding
    Minding
  • 전체
    오늘
    어제
    • 울고넘는 딥러닝 (278)
      • Minding's Baseball (57)
        • MLB Statcast (29)
        • 머신러닝으로 홈런왕 예측하기 (3)
        • 야구칼럼 (12)
        • 야구 규칙, 용어 (1)
        • 2022-23 질롱 코리아 (8)
        • 류현진 등판경기 (4)
      • Minding's Programming (185)
        • 프로그래머스 코딩테스트 (21)
        • Knowledge (44)
        • Numpy & Pandas (6)
        • Excel (3)
        • Git (1)
        • Pygame (11)
        • CV (3)
        • Tensorflow tutorial (4)
        • Kaggle and Dacon (4)
        • 에러 코드 (8)
        • FastAPI (8)
        • Airflow (29)
        • Crawling (6)
        • Django (14)
        • AWS (18)
        • Spark (5)
      • Minding's Reading (30)
        • 머신러닝 딥러닝에 필요한 기초 수학 with 파이.. (2)
        • 칼만필터는 어렵지 않아 (11)
        • 밑바닥부터 시작하는 딥러닝 (6)
        • 메이저리그 야구 통계학 2e (8)
        • 논문읽기 (2)
        • 빅데이터를 지탱하는 기술 (1)
      • Minding's Life (5)
        • 주식 (4)
        • 각종 소식 (1)
  • 블로그 메뉴

    • 홈
    • Baseball
    • Programming
    • Reading
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    파이게임
    야구
    django
    칼만필터는어렵지않아파이썬
    파이썬
    넘파이
    KBO
    머신러닝
    칼만필터
    에어플로우
    데이터 엔지니어
    파이썬게임개발
    프로그래머스
    MLB
    pygame
    칼만필터는어렵지않아
    Airflow
    KalmanFilter
    AWS
    칼만필터는어렵지않아python
    Python
    FastAPI
    코딩테스트
    게임개발
    django python
    mlb stats api
    메이저리그
    딥러닝
    질롱코리아
    데이터분석
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
Minding
[MLB Stats API] statsapi.game_pace(season=datetime.now().year, sportId=1)
상단으로

티스토리툴바