Toolbox: Pitch Usage by Count

I wanted to do a 10-57 piece about Luis Avilan. I wanted to find some sort of interesting piece of data that would give more enlightenment about his failure to produce this year beyond just, “he’s a bad pitcher.” Unfortunately, all I found was simply normal evidence of him being a bad pitcher. Yeah, his pitch usage has changed ever so slightly, and some pitches has been less effective this year than they were last year, but ultimately it was just another picture of a player regressing. If you want to read a piece about a player who pitched or hit over his head for a while before coming back down to where we’d expect him to perform, google it. There’s plenty of those out there.

But one positive did come from me doing the requisite research for that potential post. While trying to nail down his issues with his curveball, I realized there wasn’t a way to quickly view a pitcher’s usage by count. Yes, you can look at one thing at a time, but I wanted to see usage in all counts at one time. Because I wasn’t able to quickly find it online, I did what any bored nerd expert researcher would do and made it myself. Now, I will present the tool to you, along with some quick instructions for how to use it. Feel free to look over it and let me know of anything that could be done differently or more efficiently, and definitely let me know of any other features you’d like added.

First, I’d like to throw in that I would love to have guys help me collect all the data for at least 2013 and 2014, but preferably all years available on the baseballsavant site. If anyone wants to help, try to do it a team at a time, and tweet at me before you start. I’ll get a Google Doc going of what data we have, and what data we need. I realize this can be a pain and many of us don’t have that kind of free time, but that would be incredibly useful to have on hand. Let me know!

Before I give you the run down of how to use it, let me explain to you just what it is and how it works. Using PITCHf/x data from baseballsavant.com, one can input a pitch type, year, and pitcher and the tool will output the usage of that pitch by count and the swing percentage against that pitch by count. Here is an example output for Luis Avilan curveballs. First we have his usage by count:

Pitcture one for the article

And here is Swing% against the pitch by count:

Capture

What you do with this data is entirely up to the user; this is simply a means of providing it. Now that you have a sense of what we have, I’ll give you the quick rundown of how to use it, along with pictures to guide you along the way. If you look hard, you may be able to find some hidden messages about our very own Barves Hall of Shame writer, K.

STEP 1: GO TO BASEBALLSAVANT.COM AND CLICK PITCHf/x Search

Home Page

STEP 2: CHOOSE A PITCHER AND YEAR FOR THE DATA YOU WANT

In this case we’re going to choose Luis Avilan and select all years. Make sure that you have Player Type set to “Pitcher.”

step 2

STEP 3: SEARCH PITCHf/x AND DOWNLOAD CSV FILE OF DATA

STEP 3

At this point you have a data file featuring what you need to create the tables. Now, let’s quickly show you how to download the excel sheet necessary.

STEP 4: DOWNLOAD EXCEL SHEET FROM GOOGLE DRIVE

Here is the link: https://docs.google.com/spreadsheets/d/11rwJDpXLxRHkIqrLi3kb4hxtfFIS_B2rLM2Hd8Idmzw/edit?usp=sharing

step 4

STEP 5: PASTE IN DATA

I’m not going to show you how to do this, because I don’t know how to take a picture of this step. Just select all the data in the CSV file of PITCHf/x data, copy it, select cell A1 in the Pitch Usage Excel sheet, and paste.

STEP 6: COPY FORMULAS

The first entries in the final two columns on the Data page need to be copied for all the rows. This can be done simply by selecting the two cells, then double-click the little box that pops up in the lower right corner. You can also click that and drag them down, but you’ll be dragging for over 1000 rows, so I wouldn’t recommend doing it this way.

step 5

STEP 7: DRINK A BEER! YOUR WORK IS DONE!

You have now finished getting everything set up! If I were you, the first thing I would do is play around with the formatting. I don’t know how to get the Google Doc formatting to translate the way I’d like it to in Excel, so you’ll have to do that afterwards.

What you do at this point is entirely up to you, but I ask that if you do use this, throw in a shout out to the blog and/or K and my twitter handles. As I said before, if you’d like to help out in the data collection, give me a shout. Enjoy!

Stephen came up with the idea for this blog shortly after graduating from Tech. Realizing that life is ephemeral, he decided to put (metaphorical) pen to paper and catalogue his thoughts. His thoughts are series of numbers and spreadsheets, casually categorized as “research,” and said research is usually conducted on the margins of what is both relevant and socially acceptable.

Posted in Baseball, Sports Tagged with: ,

Leave a Reply