- Unlike most projection systems, which use stats for past seasons, the Open Projections look at stats for each day. As a result, it can generate up-to-date projections for any point in a season.
- The Open Projections are also completely open source, in contrast to the black boxes of other projections. The methodology is available for anyone to critique and (hopefully) improve.
(This could use a lot of polish, but it's what I have so far.)
Before projecting, daily stats need to be pulled from the MLB Stats API using build_logs.py
. Run build_gamelogs(year)
for each of the six years before the intended projection date, and then combine_player_logs()
to consolidate everything into a single file.
Projections are generated by calling project_all(projection_date)
in the file for the appropriate projection (e.g. aparicio.py
or blyleven.py
) passing a string in the format "YYYY-MM-DD".
Contributions are welcome for code improvements.
Some low-hanging fruit:
- Park adjustments
- Age adjustments (by stat)
Don't code? I'd also appreciate research-backed suggestions for improving the projections in any of these areas.