boxball
MLB-StatsAPI
boxball | MLB-StatsAPI | |
---|---|---|
7 | 28 | |
110 | 470 | |
- | - | |
5.5 | 6.3 | |
5 months ago | 5 months ago | |
Python | Python | |
Apache License 2.0 | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
boxball
-
Importing Retrosheet to Tableau or Power BI
I haven't worked with BI tools, but I'll make the same recommendation for Retrosheet data that I always do: check out the Boxball distributions, specifically the CSV files (or the parquet files if you prefer). You can load those right in, rather than futzing with Retrosheet's event files and processing them manually, etc., just to get to the same spot.
-
Delta Aging Curve Python
The original data source is the Baseball Databank (aka "The Lahman Database"). I use the Boxball distributions, which include both retrosheet and Baseball Databank data.
- What's the current standard for getting mlb data into a database? I used to use Baseball On a Stick (which accessed the old gameday data) but that doesn't work now. I found "mlbdata" which accesses the mlb API but I can't figure out how to make it put stuff into a database. Is there a good option?
-
How do I compile a list of a team's games where event x did not happen?
You know, I thought about that after posting, that the dailies might not be available directly from retrosheet. I use the Boxball distributions, which take the retrosheet data and process it into database images. These distributions include a "daily" table with the daily logs. So apparently Boxball is generating that table.
-
Aggregate Game Logs
I used to think the same thing, and then I found the Boxball pre-built images. You still have to be a bit handy to get them working, but it's way easier than starting from scratch with raw retrosheet data. I initially used the postgres image and worked in SQL, and then switched to python/pandas and the parquet files.
-
Finding a player's stats through N games
I've always been good with data, math, Excel, etc., but decided to take it to another level during the pandemic. The most difficult thing about Retrosheet data is getting into a usable format. Luckily, the boxball project has created a number of ready-to-download images with all of the data, for different database technologies.
-
RE24 Data for wOBA Calculations
For Retrosheet data, I've been using pre-built images from Boxball, rather than going through the whole process of downloading and converting the files from retrosheet. The Boxball images are awesome. I mostly use the Parquet files for Pandas, but they have other formats (e.g., postgres Docker images, CSV, etc) there.
MLB-StatsAPI
-
I Built a Desktop Scoreboard to Follow Cardinals Games
Yeah, I used this API which made the code fairly straightforward: https://github.com/toddrob99/MLB-StatsAPI
-
Access Question
I don't know if you're using python, but even if not, there's info about the endpoints on the MLB-StatsAPI python wrapper wiki here.
- Innings data — am I calling the right API?
-
How to make a smaller call to https://statsapi.mlb.com/?
Yes, there are endpoints to get subsets of the game/live endpoint. The endpoints are documented here. You'll probably be interested in game_boxscore, game_linescore, and game_playByPlay.
-
Baseball Savant API
pybaseball and MLB-StatsAPI are the go-to python wrappers for the official MLB API.
- Data sources for MLB ABs?
-
Python for Baseball
The MLB-StatsAPI is really good too. The creator is active on the data sub, and I think is the mod of the sub.
-
API Endpoints?
The public endpoints are listed here. There is a statcast endpoint that's not listed there, but it requires authentication and MLB only gives access to teams and affiliates.
-
Python OOP Module for MLB Stats API ready for input
There are still several things that need completion, reactors, and documentation. If you are familiar with toddrob99's wrapper then some of this might be familiar. I must thank Toddrob for his work as we used a lot of his wiki and documentation to get started. https://github.com/toddrob99/MLB-StatsAPI
- MLB Stats API Question
What are some alternatives?
pybaseball - Pull current and historical baseball statistics using Python (Statcast, Baseball Reference, FanGraphs)
ElectroCRUD - Database CRUD Application Built on Electron | MySQL, Postgres, SQLite
BaseballTheater
chadwick - Chadwick tools for manipulating baseball data
mlbgame - A Python API to retrieve and read MLB GameDay data
baseball_sql - SQL scripts for working with the baseball data from retrosheet and baseball-databank, as provided by boxball
mangadex - A python wrapper for the mangadex API V5. Work in progress
baseballr - A package written for R focused on baseball analysis. Currently in development.
MLB-Sharp - Unofficial .NET wrapper library for the MLB Stats API. [Moved to: https://github.com/markjamesm/Baseball-Sharp]
condenser - Condenser is a database subsetting tool
zenpy - Python wrapper for the Zendesk API