How I Use Our Custom Leaderboards

I get asked a decent amount of questions on Twitter, and while I try to answer as many of them as I can, I don’t really have enough time to get to all of them, unfortunately. However, a question I received yesterday contained the magic formula to not only getting his question answered, but getting a longer answer in the form of a full length FanGraphs post:

@d_a_cameron When using fangraphs custom leaderboards, what stats do you typically use? Anything that doesnt appear normally?

Why am I answering @jjdouglas1′s question here? It’s quite simple, really – this is his profile picture.

I’m not above admitting that anyone who dons a FanGraphs t-shirt in their Twitter profile picture is going to get special treatment. So, Mr. Joe Douglas, we salute you and your wardrobe choices, and this post is for you. Besides, the Custom Leaderboards are awesome, and they’ve quickly become one of my favorite parts of the site, so giving them a little more attention is certainly warranted.

If you just click on “leaders” from the home page, you’re greeted with a nifty list of the top 35 position players in baseball last year, sorted by their 2011 WAR. While you can then use the different sections of the leaderboards to delve into all of the various metrics we have here on the site, perhaps the best way to use them is to scroll down to the bottom.

There, you’ll find two separate Custom sections – one titled “Custom Leaderboards” and one titled “Custom Players”. The Custom Player list is a really great tool for showing several player’s statistics side by side, as I did with Frank Tanana and Jack Morris on Saturday. I love the Custom Player list and use it all the time. However, it’s the Custom Leaderboard that has become my time sink du jour as of late.

For instance, here’s the default leaderboard that I’ve created for when I want to look up various pitchers over the last decade, which gives me the following list of statistics.

Season IP BB% K% GB% HR/FB LOB% BABIP ERA- FIP- xFIP- FBv
2011 43527.1 8.1 % 18.6 % 44.4 % 9.7 % 72.5 % .291 100 100 100 91.5

Since I have set it start out on League Stats, I begin by getting the league averages for each of those numbers from last year. This is a nice little reminder of context, so that when I start browsing through various player leaderboards, I have a recent memory of what the norms are for each number that I’m looking at.

Overall, I think that these numbers give me a pretty good idea of what pitcher-type I’m looking at in a package that is pretty easy to see. I get the three core stats (BB%, K%, GB%) that determine a large amount of a pitcher’s abilities to prevent runs, and then also get to see the variables that usually drive the differences between a pitcher’s expected runs allowed and his results in a given timeframe (BABIP, HR/FB, LOB%). From there, we get these numbers essentially distilled down into their results relative to the league average thanks to the minus categories, allowing us to see the collection of those various components. Finally, I include fastball velocity at the end, just to get a better idea of what kind of stuff a pitcher was working with to get the results from the previous nine categories.

These 10 numbers sum up the majority of what I want to know about a pitcher in most circumstances, especially when comparing past performance between multiple players. And they do it a nice, clean, easy to understand manner that lets me play around with the data in interesting ways. For instance, with just a couple of clicks, I can go from League Stats to Player Stats, adjust the minimum innings filter to 100, then sort by average fastball velocity, and there we can find interesting tidbits like just how similar Jeff Francis and Mark Buehrle were in their core stats last year.

I have a similar list for hitters, which also focuses on their core skills and the results of those skills. However, I don’t use this one quite as much since so many of these numbers overlap with the standard FanGraphs Dashboard. More often with hitters, my use of the Custom Leaderboard focuses on looking at a player’s approach at the plate, such as how low contact hitters can succeed if they also have patience and top-notch power, but Miguel Olivo explains why swinging and missing a lot can make a hitter pretty terrible if he has neither.

Beyond just looking at the leaderboards on the site, however, the Custom Leaderboards and Custom Player lists are also extremely useful tools when we want to play around with the data in Excel. Since you can export any leaderboard from the site into a CSV with one click, it’s super easy to create a custom report with just the numbers you want to look at, then dump it into a spreadsheet and filter to your heart’s content. For instance, if I want to see what other everyday players have matched Olivo’s combination of low contact rate and absurdly high swing rates in a single season, I can simply export this list and use Excel’s filters to view all players with a contact rate below 70% and a swing rate above 55%.

Within seconds, I’ve learned that the only other full-time player with that profile in the last 10 years was the 2002 version of Jacque Jones. Perhaps we shouldn’t be overly surprised, then, that Jones wasn’t able to sustain his performance for long and fell off a cliff at age 29, since opposing pitchers can easily exploit that kind of aggressive approach at the plate.

And, if I want to share the findings of what I’ve filtered after exporting the leaderboards into Excel, there’s a fantastic CSV to HTML table tool that simply lets me copy my tab delimited data from Excel right into the box, set my desired table width, and one click later, wham, instant HTML table.

Using the Custom Leaderboards and Custom Player Lists, anyone can essentially run their own specialized queries on the FanGraphs data set, then share the results with the world, all without any kind of database knowledge required. You can find players with similar skillsets, compare and contrast their results over multiple years, run correlations between different variables, or do nearly anything else your heart desires.

Essentially, the Custom Leaderboards turn FanGraphs into your very own queryable database. It’s perhaps the best kept secret on the site, but it’s also one of the very best tools available to anyone who wants to play around with the data and see just how different types of players can produce value on the field. Even if you’re just interested in tweaking the lists to give you specific pages to follow the results of your fantasy team, I highly encourage you all to take advantage of the customization options that David Appelman has provided here on the site. They’re amazing, and you’ll quickly fall in love with them as I have.




Print This Post



Dave is a co-founder of USSMariner.com and contributes to the Wall Street Journal.

23 Responses to “How I Use Our Custom Leaderboards”

You can follow any responses to this entry through the RSS 2.0 feed.
  1. MauerPower says:

    This is what I’ve been waiting for. Nice detailed response on the custom reports/leaderboards, Dave. One question though. We don’t have excel on our computer right now but in the summer I am getting a laptop because I start college in the fall. How do you filter with excel? Is it an easy thing to do? Right now I use google docs, which works fine but I don’t think it can filter. Unless I am mistaken.

    Vote -1 Vote +1

  2. jjdouglas says:

    @MauerPower filtering on excel is easy. Usually at the top “ribbon” there is a tool that will do it called “sort and filter” or something of the like, depending on the version of excel.

    Vote -1 Vote +1

  3. rcbuss says:

    Great stuff.

    Is there a way to make a custom report that excludes certain segments of the player population (e.g., excluding pitchers from batting league totals)?

    Thanks.

    Vote -1 Vote +1

    • statszombie says:

      You can still use all those tools above the data (restricting positions, rookies, years, PAs, etc.). That said, I’m not sure if you can exclude pitchers

      Vote -1 Vote +1

  4. jim says:

    is there going to be another shirt sale?

    Vote -1 Vote +1

  5. xeifrank says:

    Kind of on topic here. Dave A, could you make the BIS ID one of the exportable options in the “new” export feature (the one that doesn’t have all the html embedded in it). In the “old” export you can at least write a script to get the BIS ID out, but unless I am missing something but in the new export feature (which is cleaner) you cannot export out the BIS ID and for some of us researchers we go by BIS ID and not player name in our databases.
    Thanks. vr, Xei

    Vote -1 Vote +1

  6. Jason says:

    I highly recommend everyone start exporting the data into R (http://cran.r-project.org/) and not Excel. It is real statistical analysis software and it is free for anyone to download. It is time baseball stat fans get beyond sorting through lists and start actually testing hypotheses in a rigorous way.

    Vote -1 Vote +1

    • BoSoxFan says:

      please tell me how to use R, it is so confusing, I made a CSV file as an Rdata file and it said it was corrupted or something. I have R on my computer.

      Vote -1 Vote +1

      • Jason says:

        It can be a little tricky to get data frames loaded into R if you are not used to working with programs like R. The program is very sensitive to file format. You have to be sure your input file is formatted correctly (and this might involve proper formatting on the hidden characters such as line endings and white space). You also have to be sure you are using the proper command to load the file. The CRAN website is extremely useful.

        Once you get past these little hurdles, R is actually quite easy to learn and to use. It is much easier to use than Excel, for example.

        Vote -1 Vote +1

      • statszombie says:

        Simply write
        variableName = read.csv(‘yourFile.csv’, header=TRUE)
        on the command line, replacing variableName with whatever you want to call it and yourFIle.csv with your file’s name.

        That said, if you are looking to use a spreadsheet format, I don’t think the standard distribution of R includes that functionality. You can download one of the GUI packages, which you might prefer (RKWard has spreadsheet functionality, though I personally don’t like it).

        Personally, I hate Excel. Everything is so much easier to do with R, but it has a relatively steep learning curve, and it’s much steeper if you have never programmed before. Once you get the hang of it, you’ll prefer it over Excel, but that might take awhile.

        Vote -1 Vote +1

      • GoateesOnly says:

        When learning how to use R, google is your best friend. type in the exact error message and odds are many people have experienced the same thing.

        Vote -1 Vote +1

    • MauerPower says:

      It said it could harm my computer.

      Vote -1 Vote +1

  7. TheSinators says:

    Dave, this is the best post ever. I’m all-in on any post that explains how you think/work. Great stuff.

    Vote -1 Vote +1

  8. JD says:

    I hope that fangraphs shirt is stain-resistent.

    Vote -1 Vote +1

  9. Captain Insano says:

    I bet that guy’s still a virgin!

    Vote -1 Vote +1

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *