Sabermetrics scripts for some old blog posts analyzing the 2014 Oakland A's.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Charles Reid bd82b99a01 updating team wins pirms 6 gadiem
data wrapping up stuff for part 3 of batting stats worthless post pirms 7 gadiem
figs adding team wins script for part 2. pirms 7 gadiem
figs_wins updates from weekend work. pirms 7 gadiem
.gitignore Initial commit pirms 7 gadiem
AllTeams.py updates to home run variance/correlation plots. plot all kdes and multivariate kdes in AllTeams.py. add some figures. pirms 7 gadiem
AthleticsABKDE.py moving some files. adding readme. pirms 7 gadiem
CombineEverybody.py combining all team batting data into single file. correlation script. pirms 7 gadiem
HRVariance.py updates to home run variance/correlation plots. plot all kdes and multivariate kdes in AllTeams.py. add some figures. pirms 7 gadiem
LICENSE Initial commit pirms 7 gadiem
MultivariateTeamWins.py wrapping up stuff for part 3 of batting stats worthless post pirms 7 gadiem
NullHypothesisBattingStats.py wrapping up stuff for part 3 of batting stats worthless post pirms 7 gadiem
README.md Removing unused files. Updating readme. pirms 7 gadiem
Regression.py updating wins analysis script. adding lin reg, qq plots, resid plots, etc. pirms 7 gadiem
TeamWins.py updating team wins pirms 6 gadiem
Wins.py updates from weekend work. pirms 7 gadiem
ols.py updates to team-by-team win stats pirms 7 gadiem
plot_bivariate_normal_dist.py updating wins analysis script. adding lin reg, qq plots, resid plots, etc. pirms 7 gadiem

README.md

This repository contains some scripts and data for sabermetrics (analysis of baseball statistics.)

Octopress Blog Posts

I am using these scripts to write a series of Octopress blog posts. These are listed here, along with the scripts that correspond to each post.

Kernel Density Functions and the Oakland Athletics

  • The file AthleticsABKDE.py generates KDEs for at-bats, analyzed in this first post.

Using Multivariate KDEs to Examine How Baseball Is Changing

  • The file AllTeams.py generates univariate and multivariate KDEs for multiple batting stats, for all teams

  • The file HRVariance.py contains variance and correlation plots for home runs and how they change, or are correlated with other variables

Data

I've put together some data files, contained in the data/ directory. This consists of batting statistics for individual teams, plus a master batting stats file that contains batting statistics for all teams.

  • The data are all in CSV format and come from Baseball-Reference.com

  • The file CombineEverybody.py combines data for all teams into the master batting stats file.