Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/beanumber/retro
An R package for creating a Retrosheet database using the ETL framework
https://github.com/beanumber/retro
Last synced: about 2 months ago
JSON representation
An R package for creating a Retrosheet database using the ETL framework
- Host: GitHub
- URL: https://github.com/beanumber/retro
- Owner: beanumber
- Created: 2017-12-19T00:20:16.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-21T19:38:33.000Z (over 5 years ago)
- Last Synced: 2024-08-13T07:12:49.847Z (4 months ago)
- Language: R
- Size: 29.3 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
- jimsghstars - beanumber/retro - An R package for creating a Retrosheet database using the ETL framework (R)
README
---
title: "retro"
output:
github_document:
html_preview: true
---[![Travis-CI Build Status](https://travis-ci.org/beanumber/retro.svg?branch=master)](https://travis-ci.org/beanumber/retro)
An R package for creating a Retrosheet database using the ETL framework
```{r, eval=FALSE}
devtools::install_github("beanumber/retro")
library(retro)
``````{r, eval=FALSE}
system("mysql -e 'CREATE DATABASE IF NOT EXISTS retrosheet;'")
db <- src_mysql_cnf("retrosheet")
retro <- etl("retro", db = db, dir = "~/Data/retro/")retro %>%
etl_init() %>%
etl_extract(season = 2013:2016) %>%
etl_transform(season = 2014:2016) %>%
etl_load(season = 2014)# add partitions
dbRunScript(retro$con,
system.file("sql", "optimize.mysql", package = "retro"))
```![](http://www.retrosheet.org/hitloc.jpg)
## Compare To
- (https://github.com/rmscriven/retrosheet): last commit was 2015; not on CRAN; does not require `chadwick`
- (https://github.com/davidbmitchell/Baseball-PostgreSQL): Only for PostgreSQL; also requires `chadwick`## Installing Chadwick
On Ubuntu:
```{bash, eval=FALSE}
# download the source code
wget https://sourceforge.net/projects/chadwick/files/chadwick-0.7/chadwick-0.7.2/chadwick-0.7.2.tar.gz -P /tmp
# unzip it
tar xvzf chadwick-0.7.2.tar.gz
# change directory
cd chadwick-0.7.2
# setup the source code for compilation
./configure
# build it from scratch
make
# install it
sudo make install
# set the linker path so it will actually work
export LD_LIBRARY_PATH=/usr/local/lib
``````
Libraries have been installed in:
/usr/local/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
```