All Projects → panzarino → Mlbgame

panzarino / Mlbgame

Licence: mit
A Python API to retrieve and read MLB GameDay data

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Mlbgame

openrowingmonitor
A free and open source performance monitor for rowing machines
Stars: ✭ 29 (-93.5%)
Mutual labels:  sports
Strava-Analysis-Tool
A Python tool to analyze and display Strava activity data.
Stars: ✭ 32 (-92.83%)
Mutual labels:  sports
sport-stats
Sport stats UI components
Stars: ✭ 62 (-86.1%)
Mutual labels:  sports
opta sd
OPTA Sports Data Soccer API Client (OPTA SDAPI)
Stars: ✭ 28 (-93.72%)
Mutual labels:  sports
retrosheet
Project to parse retrosheet baseball data in python
Stars: ✭ 19 (-95.74%)
Mutual labels:  sports
flask-react-d3-celery
A full-stack dockerized web application to visualize Formula 1 race statistics from 2016 to present, with a Python Flask server and a React front-end with d3.js as data visualization tool.
Stars: ✭ 20 (-95.52%)
Mutual labels:  sports
kobe-every-shot-ever
A Los Angeles Times analysis of Every shot in Kobe Bryant's NBA career
Stars: ✭ 66 (-85.2%)
Mutual labels:  sports
Mlb Led Scoreboard
An LED scoreboard for Major League Baseball ⚾️
Stars: ✭ 321 (-28.03%)
Mutual labels:  sports
brackets-viewer.js
A simple library to display tournament brackets (round-robin, single elimination, double elimination).
Stars: ✭ 52 (-88.34%)
Mutual labels:  sports
tutorials
Git Repo for Articles on Ergo Sum blog and the youtube channel https://www.youtube.com/channel/UCiie9CN--dazA7iT2sry5FA
Stars: ✭ 42 (-90.58%)
Mutual labels:  sports
replay-table
A javascript library for visualizing sport season results with interactive standings
Stars: ✭ 67 (-84.98%)
Mutual labels:  sports
IPL-ML-2018
Predicting IPL match results. https://kuharan.github.io/IPL-ML-2018/
Stars: ✭ 14 (-96.86%)
Mutual labels:  sports
eureka
✍️ I read, I write, I think, I do, I learn, I code.
Stars: ✭ 106 (-76.23%)
Mutual labels:  sports
nhl-twitter-bot
🚨 Hockey Game Bot is a Python application that sends important NHL events to social media platforms in (near) real time.
Stars: ✭ 18 (-95.96%)
Mutual labels:  sports
baddy-makers-edition
The place for the BADDY community to: get all you need (dxf plans, code etc.) to make and build your own BADDY share issues... and fixes! create stunning new features
Stars: ✭ 20 (-95.52%)
Mutual labels:  sports
dewdle
A remote video-feed drawing tool (telestrator) for streaming and broadcast environments.
Stars: ✭ 29 (-93.5%)
Mutual labels:  sports
scoreboard
CRG Derby Scoreboard
Stars: ✭ 83 (-81.39%)
Mutual labels:  sports
Nba.js
A Node.js library for current and historical NBA stats, scores, and data.
Stars: ✭ 339 (-23.99%)
Mutual labels:  sports
Localradio
📻 LocalRadio is "Radio for Cord-Cutters" – a Software-Defined Radio (SDR) app for your Mac and mobile devices. With an inexpensive RTL-SDR USB device, LocalRadio provides a casual, home-based radio listening experience for your favorite local frequencies - FM broadcasts/free music/news/sports/weather/public safety & aviation scanner/etc.
Stars: ✭ 269 (-39.69%)
Mutual labels:  sports
node-mlb-api
A Node.js wrapper for the new MLB Stats API.
Stars: ✭ 18 (-95.96%)
Mutual labels:  sports

mlbgame

Build Status Code Climate Coverage Status

Join Slack

mlbgame is a Python API to retrieve and read MLB GameDay data. mlbgame works with real time data, getting information as games are being played.

mlbgame uses the same data that MLB GameDay uses, and therefore is updated as soon as something happens in a game.

mlbgame documentation

mlbgame on Github (Source Code)

If you have a question or need help, the quickest way to get a response is to file an issue on the Github issue tracker

mlbgame's submodules should not really be used other than as used by the main functions of the package (in __init__.py).

Use of mlbgame must follow the terms stated in the license and on mlb.com.

Installation

mlbgame is in the Python Package Index (PyPI). Installing with pip is recommended for all systems.

mlbgame can be installed by running:

pip install mlbgame

Alternatively, the latest release of mlbgame can be downloaded as a zip or tarball. If you do not install with pip, you must also install lxml as specified in setup.py.

If you want to help develop mlbgame, you must also install the dev dependencies, which can be done by running pip install -e .[dev] from within the directory.

Examples

Here is a quick teaser to find the scores of all home Mets games for the month of June, 2015:

from __future__ import print_function
import mlbgame

month = mlbgame.games(2015, 6, home='Mets')
games = mlbgame.combine_games(month)
for game in games:
    print(game)

And the output is:

Giants (5) at Mets (0)
Giants (8) at Mets (5)
Giants (4) at Mets (5)
Braves (3) at Mets (5)
Braves (5) at Mets (3)
Braves (8) at Mets (10)
Blue Jays (3) at Mets (4)
Blue Jays (2) at Mets (3)
Reds (1) at Mets (2)
Reds (1) at Mets (2)
Reds (1) at Mets (2)
Reds (2) at Mets (7)
Cubs (1) at Mets (0)

Maybe you want to know the pitchers for the Royals game on April 30th, 2015:

from __future__ import print_function
import mlbgame

day = mlbgame.day(2015, 4, 12, home='Royals', away='Royals')
game = day[0]
output = 'Winning pitcher: %s (%s) - Losing Pitcher: %s (%s)'
print(output % (game.w_pitcher, game.w_team, game.l_pitcher, game.l_team))

And the output is:

Winning pitcher: Y. Ventura (Royals) - Losing Pitcher: C. Wilson (Angels)

You can easily print a list of the Mets batters in the final game of the 2015 World Series:

from __future__ import print_function
import mlbgame

game = mlbgame.day(2015, 11, 1, home='Mets')[0]
stats = mlbgame.player_stats(game.game_id)
for player in stats.home_batting:
    print(player)

And the output is:

Curtis Granderson (RF)
David Wright (3B)
Daniel Murphy (2B)
Yoenis Cespedes (CF)
Juan Lagares (CF)
Lucas Duda (1B)
Travis d'Arnaud (C)
Michael Conforto (LF)
Wilmer Flores (SS)
Matt Harvey (P)
Jeurys Familia (P)
Kelly Johnson (PH)
Jonathon Niese (P)
Addison Reed (P)
Bartolo Colon (P)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].