Skip to content

Instantly share code, notes, and snippets.

@tcash21
Last active December 15, 2015 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tcash21/5340970 to your computer and use it in GitHub Desktop.
Save tcash21/5340970 to your computer and use it in GitHub Desktop.
library(pitchRx)
## scrape all pitchFX data from May 4th, 2012
dat <- scrapeFX(start = "2012-05-04", end = "2012-05-04")
## Join tables for data analysis
pitchFX <- join(dat$pitch, dat$atbat, by = c("num", "url"), type = "inner")
pitches <- subset(bos, pitcher_name = "Jon Lester")
facets <- facet_grid(. ~ stand)
strikeFX(pitches, geom = "tile") + facets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment