tiyd-python-2015-08 / assigments

11 stars 10 forks source link

15 -- Moneyball -- Ryan Burton #230

Closed rryanburton closed 9 years ago

rryanburton commented 9 years ago

Money Ball

Description

Put together an all-time best roster of cheap players who had great on base percentages

Tasks

After completing this assignment, you should understand:

After completing this assignment, you should be able to:

In the movie / book Moneyball - data analysis is employed to discover that teams that had a roster containing players with a high on base percentage (OBP) did very well in the regular season. Using this knowledge the General Manager was able to create a very successful team on a shoestring budget with players that had a high OBP.

First get the most recent complete baseball statistics dataset from Sean Lahman's website. Unzip it into a data/ directory inside your repository.

With this data downloaded, create an IPython Notebook called moneyball.ipynb that joins together many of the different tables so you are able to find each player's OBP and their salary.

YOUR JOB is to put together the starting 9 player roster for a single season. How? You need to find the players with the highest OBP and the lowest salary in any specific year. Make sure you are removing outliers (an OBP of 1.0 is not an indicator of a perfect player, more like they possibly only played 4 or 5 games and had good luck, alternatively an OBP of 0 is pretty bad). Your 9 player roster should include:

A player that historically played multiple positions can not account for 2 places on your roster.

Hard Mode

In addition to the required objectives outlined above you should adjust each player's salary for inflation based on the year they earned the salary.

Also you are required to put together an "all time best" legacy team based on their adjusted salary.

Note

You will have to calculate the on base percentage for each player. Here is the formula you might want to use On Base Percentage

rryanburton commented 9 years ago

https://github.com/rryanburton/moneyball

got some great stats but not quite a roster

@powder-river @jamesmallen

powder-river commented 9 years ago

@rryanburton good looking code, good discussion this morning. let me know if you have any questions afterwards