Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Opening day is on the way Time to set up a persistent database to collect every pitch thrown in this year’s baseball season.
The mlbgameday
package is designed to facilitate extract, transform and load for MLBAM “Gameday” data. The package is optimized for parallel processing of data that may be larger than memory. Learn more about the project here.
Install from CRAN
install.packages("mlbgameday")
Creating a Database
Extract Transform Load of MLB Advanced Media Data
Once you have a database in-place, you can get started quickly. The mlbgameday
package will work if your current database was gathered using the pitchRx
package.
Task Scheduling
I prefer to pull the day’s data early in the morning (for the day before.) What ever time you choose, you want to consider time zones and allow enough additional time to cover rain delays for late games, as not to miss any information. There are various task scheduling tools, depending on your operating system.
-
Linux or OSx: Cron is pretty much the universal standard. Cron is command line driven, but GUI interfaces exist for both operating systems.
-
Windows: Several options, but the built-in task scheduler is probably the best.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.