What I’ve been up to

So I haven’t posted here in much, much too long. But that doesn’t mean that I haven’t been doing things! Without any additional commentary, here are plots of balls hit by batted ball type (fly ball/ground ball/line drive/pop up) for 2007-2009. Note that to smooth the data, the count shown on the right is the number of balls within a 5 foot radius of that point. Also, I have not done any work yet to clean the data, so there are a few points here and there that don’t make much sense.

Fly balls:

Ground balls:

Line drives:

Pop ups:

Does strategy = talent?

Cliff Lee is dealing tonight: 9 Ks/0 BBs through 7 IP (and maybe more to come soon). No doubt he’s one of the best – if not the best – pitcher in the game at the moment. He’s throwing nasty pitches but also mixing them up effectively and hitting his spots. Now I think it’s clear to say that his pitch quality and precision are “talents.” Maybe more debatable is his pitch selection and general location – I’ll contend that it is a strategy, instead. Could he possibly be performing even more effectively if he had Greg Maddux in his ear calling pitches?

Lee is still really good by any measure – now 10 Ks/0BBs through 8.

This post has been revised on account of being written while highly distracted by baseball and after a few beers. It needs to be expanded upon anyway.

TTL updates

Spent the weekend in the Bay Area visiting soon-to-be family and already-been friends, including your beloved Niv. On the flight out I played around with TTL in order to get the layout down for the time being. Obviously it’s nothing fancy, but it’ll do for the time being.

Now the fun begins – actually getting some content together. I think I’ve got the basics down for what I need to do, and really the goal is only to get a dummy hitter and pitcher pages up in time for Phoenix. I think I’m going to run with Shin-Soo Choo on the hitter side and Max Scherzer on the pitcher side – for no other reason than they’re just both pretty fun players.

Off to do that now. Who knows? Maybe there will be another update later tonight if things really work/really don’t.

R break

I’ve been playing around with 2010 Gameday data all night (courtesy of Niv, thanks as always!). Downloaded the R RMySQL plugin to help run the show, but unfortunately the only documentation I can find is this. I’m sure it’s got everything I need… but for some reason it’s all arranged in alphabetical order. So for someone just getting started, I have to guess about which command is relevant for where I am in the process (connecting, import data, run a query, save output) and go from there. Certainly doable, but not exactly the easiest.

For a bit of a break I figured I’d jump over here for a bit to talk about what I’m up to. First step in the process is this – calculating an AVG and SLG for each spot on the field by batted ball type. Using the XY data from Gameday and these park adjustments (I’m starting with the 2008 figures from here – even though I’m using 2008-2010 data – and will eventually tweak them as I see necessary as I become more familiar with the data) I’m coming up with a total list of all balls in hit into play and the rate in which the possible outcomes occur for that location on the field.

Once I get all that in, I’ll have to run a loop to help smooth out the data – for each spot/type, I’ll look at all the balls hit within an X foot radius (weighting balls on the periphery of that area less than ones at the center) and calculate a weighted average of all of the relevant stats.

Now there are a million and a half different reasons that this isn’t optimal (data quality, adjustment factors, player positioning, the way different parks play, etc) but it’s a reasonable start. This is the best data that I have available to me for now, and I think at the very least I can use it to create some fun maps in R (something I’ve been wanting to do for some time now).

Stars aligning

What a weekend.

Not that I wasn’t motivated to be working on this project before, but now we’ve kicked it up another notch. Niv was in town for the weekend and we had a whole lot of time to talk about where things are going and what it all could lead to. And I’m very much convinced it can lead to big, big things.

November 5. 32 days. Let’s go.