Creating a Baseball Database with baseballDBR
This article is originally published at https://www.datascienceriot.com/
My original motivation to write the baseballDBR
package for R was to provide a quick and easy way to have access to Sean Lahman’s Baseball Database. The Lahman
package has been around for several years, and is a great resource, however it lacks consistant updates. Also, the CRAN repository has limits on how large data packages can be, and the Lahman
package is currently pushing that limit.
The answer was an “open-data” format that is maintained by the Chadwick Bureau’s Baseball Databank, which is based on Sean Lahman’s database, version 2015-01-24, but has additinal tables aggregated from Retrosheet data.
For further details, see the GitHub page for the baseballDBR
package. In the meantime, we’ll spin through a few lines of code that will quickly get us up and running.
The following is based on the assumption we have an empty Postgres database called “lahman.” If you prefer another database, the following method should also work with MySQL and the RMySQL
package.
Thanks for visiting r-craft.org
This article is originally published at https://www.datascienceriot.com/
Please visit source website for post related comments.