13 Responses

  1. Jesse
    Jesse at |

    Great article, Tanner. I had figured out how to download the next day’s probables by changing url one day ahead. Two things. … the data I use is available only when I select custom data table on the bottom, not on the probables landing page, and two, fangraphs is not perfect in listing the probables. Oftentimes it will list a position player in place. But great article and I definitely will play with it.

    1. Tanner
      Tanner at |

      Hi Jesse, thanks!

      I agree, the stats shown on the probables page is not everything you’d want to see. I would probably suggest getting a more comprehensive stats list for all hitters and pitchers and putting them in your file somehow. Then don’t rely upon the stats just from the probables page.

      And I can also throw in one more problem about the data you didn’t mention… I believe when a player is traded during the season, Fangraphs no longer shows a team for the player (because they have played for more than one).

      But there are a few things that might help you work around this.

      1. If you click on the column headers of the table, the data will sort. And this also changes the URL of the page, meaning you can just tailor the URL and the data can be sorted when it comes into your Excel file. So you might be able to filter out position players by sorting innings pitched in descending order. It looks like you need to add “&sort=8,d” somewhere in the URL.
      2. You can also toggle the “Split Teams” check box toward the top of the page. This might help you get around the players traded during the season. For example, this breaks David Price into David Price on the Blue Jays and David Price on the Tigers.
      3. I noticed the list can sometimes go onto a second page, which normally is troublesome with Fangraphs reports… But for this one it actually changes the URL and puts “&page=2_30” on it. It looks like you can trick it and say “&page=1_50”. Meaning “put 50 players on the first page”.

      I need to play with this more to see if you can use this on other leader boards!

  2. Jesse
    Jesse at |

    LOL…you tricked it. Phenomenal job. As to the gap where it doesn’t show the pitcher’s team if he’s been traded, on my excel spreadsheet I run a macro that searches against a master list for the player and returns their present team. So kind of a cheat there, lol…

    What I do is I have all the batters and their stats (which I update from Fangraphs (FD) every month or so) on my spreadsheet, then go to MLB schedules.com and copy and paste the day’s slate (or the next day’s slate) to my spreadsheet. Then I go to FG and download the day’s pitching probables using the custom data button on the bottom, as I don’t use the data that they supply initially. I export, then copy and paste to my program, then run my program and it THEORETICALLY spits out the day’s best batters. I’ve gotten to the point where my exporting and copying and pasting really only take about 20 minutes, but I am always looking for ways to streamline.

    I will sit down at home, with no distractions, and see how I cant take your fantastic info and fold it into my program. I am nowhere as proficient in excel or VBA as you are, as I kind of taught myself excel, and look forward to learning more from you.

    Thanks again. I’ll let you know how I make out.
    Jesse

  3. Jesse
    Jesse at |

    Tanner, do you have any success with heat maps? Or, more specifically, batter and pitcher profiles? My next step in analyzing daily batters would be to match up the pitcher’s stats vs the batter’s stats via the hitting zones. I have been manually (ugh!) inputting the zone profiles posted on BroksBaseball.net to my excel spreadsheet, with each hitter’s and pitcher’s quadrant filling a cell.

    I tried copying and pasting, but that only puts a picture of the heat map on my spreadsheet, rather than putting each number into individual cells. I know this is a longshot, but I think that would give us tremendous advantages (I would be happy to share my program with you) in analyzing the day’s plays. Do you think this can be done?

    Fabulous resources you have, and I cannot wait for a quiet night where I can sit and analyze all you have.

    Jesse

  4. Jesse
    Jesse at |

    Sorry, it’s BrooksBaseball.net. My bad.

    1. Tanner
      Tanner at |

      Ooops, sorry for not replying sooner Jesse. I’m going to e-mail you because you have a really specific question that we might need to have some back and forth on.

  5. Michael Underhill
    Michael Underhill at |

    Really enjoying going through this spreadsheet building series. I have a question though…when I import the MLB TEAM MAP as a table….excel doesn’t recognize it as a table….can’t get formulas to work. I’m sure it’s something silly that I missed.

    1. Tanner
      Tanner at |

      Hi Michael,

      Glad you’re enjoying it! Looking closely at step #5 above, do you have that “Add this data to the Data Model” box checked? And then that “Table” radio button?

      Depending on the version of Excel you’re using, those options may not exist. I think the Data Model options were added in Excel 2013?

      If you don’t have them imported as tables your VLOOKUPs or INDEX/MATCH are still possible, but the format of the formulas changes quite a bit to the traditional Excel cell/range references.

      Tanner

      1. Michael Underhill
        Michael Underhill at |

        It was something silly as I expected….the name of the table was different for some reason…renamed it in excel and everything started working….Now if I could figure out how to use pitcher handiness to map hitter advanced stats splits…:)

        1. Tanner
          Tanner at |

          Great, glad it’s working. I do have pitcher handedness in the Player ID Map. And I think I would download splits files from Fangraphs for vs LHP and a separate for vs RHP. Then set up a lookup to look in the appropriate place. You can download multiple year histories of split data from Fangraphs so you have a larger sample size you can feel confident in.

  6. Daniel
    Daniel at |

    Thanks for this awesome tool! Retrosheets uses a different team naming system. It seems like it is exactly the same as BPTEAM except Saint Louis is SLN instead of STL. If you could add a new column for retrosheets that would be awesome!

    I found their list here: http://www.retrosheet.org/CurrentNames.csv (it was on this page: http://www.retrosheet.org/Nickname.htm)

Comments are closed.