Showing posts with label Build-Your-Own NBA Draft Kit. Show all posts
Showing posts with label Build-Your-Own NBA Draft Kit. Show all posts

Thursday, September 13, 2007

Build-Your-Own NBA Draft Kit, Part 3: Laws of Averages

When we last left off, we had imported all the raw data for every player in the NBA into an Excel spreadsheet, and eliminated (usually) unnecessary categories such as PF, Ejections, and Games Started. What you should have is something that looks like this:


Before we compute per-game averages for each player and category, allow me a word as to why I use averages instead of totals. Simply put, averages are a much better way of gauging a player's impact than totals. If a player gets suspended or injured, that will of course hurt their categories from a totals point of view, while the effect on averages will be minimal. Now, injury is of course something that needs to be considered when assembling a team (see the later installment "The Human Element," but it's easier to remember which players were injured and bump then down than to scour the entire list, flagging players who missed a lot of games, then move them up drastically in your rankings. For example, if Star Player X missed 60 games due to a freak broken leg, he would have a terrible ranking based on totals, but by averages he should be right in line with previous years. Comparing by averages doesn't harm this player for his freak injury. Of course, I will revisit the topic of injuries later.

Now that I have made the decision to use averages instead of totals in our comparisons, let's get on with it. For "counting" categories like points, rebounds, and steals, quite obviously you need to divide that category by the number of games played by that player. For instance, to calculate Shareef Abdur-Rahim's average field goals per game, you would divide cell C2 by cell B2 (in the above picture). How do we do this?

First, we need to insert a column to the right of "FGM." Right click on the "D" column (or whichever column corresponds to FTM), then choose "insert" and Excel will magically insert an empty column between what were previously columns C and D.

Second, in cell D1 type "FGM/G" or some other shorthand to indicate what will lie in the column below. Resize the column if necessary.

Third, in cell D2 type "=C2/$B2" and hit enter (don't use the quotation marks, please). This will show a value of "0.5" in cell D2.

Fourth, left click on cell D2 and hold, drag down to the end of the spreadsheet (cell D452), then release the left mouse button and use Ctrl+D on your keyboard. This does what is known as "fill down," which can also be selected by going to Edit->Fill->Down. A number should appear in every cell in that column.

Notice that the cells have varying decimal places (i.e. some say 3.5, others 4.7344)? This can be corrected. Your column should still be highlighted. If it's not, click on the "D" at the top of the column. Right click, go to "Format Cells," choose the "Number" tab and the "Number" category, then "3" under "Decimal Places." You can of course use 2 or 1 or 4 if you wish, but I think 3 gives a good amount of certainty without flooding your spreadsheet with numbers.

This procedure can be used for all the "counting" categories (in my case, FGM/G, FTM/G, 3PTM/G, PPG, RPG, APG, SPG, and BPG). For categories like A/TO ratio and percentages, you need to do the same as above, but instead of automatically dividing by your "C" column (games played), you divide by FGA, FTA, or TO. For example, to calculate FT% you divide the FTM cell by the FTA cell. 4 decimal places should work just fine for these ratio categories.

If your column has a bunch of "######" cells in it, it means that your column is not wide enough to display the digits. Just double click on the cell border at the top of the column (i.e. next to the letter D) to widen the column.

One more thing; if a cell reads "DIV/O" it means that that player did not attempt a field goal (or free throw) during the season. For example, Kaniel Dickens (whoever the heck that is). Feel free to just delete these players right now to save you the hassle. Right click on the row number (i.e. "22") and choose "Delete." Alternately, if you wish to keep these players in the spreadsheet, you can chance the formula for that specific cell to "=IF(J110=0,0,J110/I110)" which states that if the player's FTA is 0, set the cell to 0, otherwise calculate it as normal.

When you are done, your spreadsheet should look something like this (this is a default 9 cat roto league setup):






As I promised last time, a brief word about what metrics we are going to use to compare players. For points leagues, going from here is really easy. You can just figure out how many points your player would get per game using your league's settings, then make a ranking of them. But for most leagues, it's just not that simple. For example, suppose we have 2 players, player A and player B. They are in every category identical, except for two, points and blocked shots. Player A averages 16 points per game, and player B averages 8 ppg. However, player A averages 1.5 blocked shots per game, while player B averages 3 bpg. A quick thought might tell you that the players are equal, because while player A is twice as good in one category, he's also half as good in another category (all other categories are equal). However, a few moments' thought beyond this would also instruct you that this is just not true. Blocked shots (primarily, but other categories like steals and three pointers) are not worth the same as others (points, rebounds). Having a guy block another 1.5 shots per game easily outweighs his deficiency in scoring. That is, not all categories are created equal; some are more scarce (and therefore more valuable).

So how do we compare players? There are several ways that I have found.

1. Something similar to VORP (value over replacement player) in baseball. Basically, you estimate the "average" player who would be on your waiver wire, and determine how much better (or worse) a player is compared to the average wire player.

2. Take a league average of per-game stats, and compare players to the league average.

3. Compare players to the league leaders in each category.

I will share my preferred method with you next time, and we will get into the real nitty gritty of working up these numbers.

Until then,
-M

Wednesday, July 4, 2007

Build-Your-Own NBA Draft Kit, Part 2: Setup

Last time, I listed several excellent reasons why building your own NBA draft kit is a stellar idea. Now we can move on to the actual doing of stuff. If you don't like actually doing stuff, you should probably check back in a few months after the NBA season has started and I'm posting more timely things. But seriously, who doesn't like doing stuff? I sure as hell do. Let's get started.

First, go to Doug Steele's excellent NBA and MLB stats page. You can find it at http://dougstats.com/. Under "Past NBA Seasons," click on "07-08 Stats." Then, on the next page, click on "All Player's Raw Data." This will open up a page with a veritable sea of data. Right click on the page and choose "select all," which of course will highlight all the data. Paste that data in a notepad file on your computer desktop (If you are using Linux, well, I don't even know where to begin. Then again, if you're using Linux, you're probably not playing fantasy basketball in the first place). If you're seriously computer illiterate, go to your desktop, right-click -> new -> text document, then rename that document "markdashrules.txt" or something similarly appropriate. Enter this text document, then paste the data into it using control+v. Save and close the document.

Now fire up Microsoft Excel. If you don't have Excel, well, you probably have Linux or a Mac, in which case this post isn't for you. If you have Microsoft Windows but not Excel, you should probably buy it, or, you know, find someone who has it. It's great not only for fantasy basketball draft kits but all sorts of other useful purposes. Close the document that automatically opened, go to file->open, change "type of file" to "all files," change the path to desktop (or wherever you decided to put the raw data text document), and select your raw data text file. Something called a "text import wizard" will then open up, which helps you convert your text file into a manipulatable Excel spreadsheet. Click "next" twice and then "finish."

One quick tip--SAVE FREQUENTLY. I have had several instances of heavy data manipulation where Excel randomly shuts down and you lose all your progress. Annoying. First, click file-save as, choose your path (Jedi or Sith, err, I mean desktop or My Documents or wherever it is you put your dirty, dirty spreadsheets), change "save as type" to "Microsoft Office Excel Workbook" (which is at the top), then name it something appropriate like Markdashisawesome.xls (new file extensions are "xlsx," which should work fine).

After saving, you can re-size the columns to show the players' entire names (blame Dikembe Mutombo, but hey, at least we don't have to use his middle names) and to cut down on the size given to the rest of the columns. This helps you view as much data as possible at any one time. Double click on the column border (at the top, where it says A, B, C, etc.) to resize. This also works for rows, by the way. For example, click the right edge of column D header to reduce its size.

The first thing you want to actually change on the spreadsheet (and the last thing I will go over in this particular entry of BYONDK) is to delete columns that have no importance to your fantasy league. For most of us, categories such as PF (personal fouls), DQ (disqualifications) and the like are completely superfluous. Right click on the columns, then go to "delete" to delete them forever more. For reference, here are what the columns stand for, and their importance:

team = the last team that player played for that season (unnecessary)
PS = positions (I usually get rid of this one because every fantasy site has different position info)
GP = games played (vital)
Min = minutes played (unimportant, unless you draft based on PER or the like)
FGM = field goals made (vital)
FGA = field goals attempted (vital)
3M = three pointers made (most likely vital)
3A = three pointers attempted (depends on your league settings)
FTM = free throws made (vital)
FTA = free throws attempted (vital)
OR = offensive rebounds (most likely unimportant)
TR = total rebounds (vital)
AS = assists (vital)
ST = steals (vital)
TO = turnovers (most likely vital)
BK = blocks (vital)
PF = personal fouls (unimportant)
DQ = disqualifications (unimportant)
PTS = points (vital)
TC = technical fouls (unimportant)
EJ = ejections (unimportant)
FF = flagrant fouls (unimportant)
Sta = starts (unimportant)

Of course, the importance of the above categories all depends on your individual league and its settings. If you are in a no-percentages league, you can get rid of stuff like makes/attempts, and I have heard of some barbarians who actually use offensive rebounds as a category (yikes!). This is the best thing about making your own draft kit--you are not bound by "standard" ranking systems which will quite often not conform to your own personalized league settings.

Next time, the real fun begins--discussing the relative merits of Pops Mensah-Bonsu versus Ruben Boumtje-Boumtje. Oh, and I might also begin calculating per-game averages for everyone in the NBA and begin discussing some metrics for player comparison.

Until then,
-M

Sunday, May 13, 2007

Build-Your-Own NBA Draft Kit, Part 1: Overview

In case the title didn't give it away, there are going to be a series of articles detailing how you, my humble reader, can build your very own draft kit using only Microsoft Excel, a pile of stats and some American ingenuity (international readers: I do apologize. Feel free to substitute Djiboutian ingenuity, Icelandic ingenuity, or whatever ingenuity you prefer).

There are several good reasons to build your own draft kit, but the biggest one has to be...

1. YOU DON'T HAVE TO PAY A RED CENT

I suppose there are a lot of people out there who enjoy paying $20-$50 for a draft kit from one of the "expert" fantasy sites out there, but I certainly am not one of them. If your time is really that valuable that you can't spend a few hours churning some numbers, then purchasing a draft kit is perfectly fine. But why are you even reading this in the first place? Go back to managing your stock portfolio!

Anyway, for the rest of us who A) have a few hours to kill, B) like understanding why exactly Danny Granger is better than Dwyane Wade (...or is he?), and C) want to save a few bucks, this is the place for you! Other reasons for building your own draft kit are...

2. FULLY CUSTOMIZABLE

Running a non-standard league that uses offensive fouls, free throws attempted, and assist/turnover ratio? Some draft kits might have a problem giving you adjusted rankings based on these categories. If you make your own draft kit, you can feel free to include and exclude whatever statistics you want based on the parameters of your league.

3. THE NUMBERS NEVER LIE

Pardon me for stealing Matt Buser's favorite line, but it really is true. Memories have a tendency to betray us. We remember some things favorably and others unfavorably. Would you build a draft kit if you had watched every single NBA game all year long, but didn't ever see any statistics? Clearly, no. So use those numbers, folks!

Others have criticized me in the past for "just looking at the numbers." Well, this may come as a shock, but fantasy sports are all about numbers! (Gasp!) This is not to say that the human element has no place, but at its core, the player with the best numbers wins.

4. IT GIVES PEOPLE SOMETHING TO ARGUE ABOUT

I am sure that some of you might disagree with my methods. That's fine! I am always open to new ideas for improving the process. I myself have second- and triple-guessed my own means of building draft kits, and have honed the process over a period of years. One of the great things about Fantasy Sports is that it gives people a competitive outlet, and I would hope that that same competitive spirit transfers over to this series (even if it consists of "You're a moron, Mark.").

Tune in next time for the second installment of the series, which will cover the following topics:

-Where to obtain fancy statistics for the NBA
-How to import said statistics in Microsoft Excel
-Where to download free pirated copies of Excel (just kidding!)
-Jessica Alba's phone number (kidding again!)
-Initial customization of the spreadsheet for our particular league (serious on this one!)

Until then, take care.
-M