-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from saiemgilani/styling
Future, progressr, and database methods
- Loading branch information
Showing
201 changed files
with
7,636 additions
and
28,017 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,12 @@ jobs: | |
|
||
- name: Install package | ||
run: R CMD INSTALL . | ||
|
||
- name: Render README | ||
run: Rscript -e 'rmarkdown::render("README.Rmd")' | ||
- name: Commit results of README | ||
run: | | ||
git commit README.md -m 'Re-build README.Rmd' || echo "No changes to commit" | ||
git push origin || echo "No changes to commit" | ||
- name: Deploy package | ||
run: | | ||
git config --local user.email "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.RData | ||
.Ruserdata | ||
data-raw | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,93 @@ | ||
Package: cfbfastR | ||
Title: Functions to Access College Football Play by Play Data | ||
Version: 1.0.0 | ||
Authors@R: c(person('Saiem', 'Gilani', email = '[email protected]', role = c('cre', 'aut')), | ||
person('Akshay', 'Easwaran', email = '[email protected]', role = c('aut')), | ||
person('Jared','Lee', email = '[email protected]', role = c('aut')), | ||
person('Eric','Hess', email = '[email protected]', role = c('aut')), | ||
person('Michael','Egle', email = '[email protected]', role = c('ctb')), | ||
person('Nate','Manzo', email = '[email protected]', role = c('ctb')), | ||
person('Jason','DeLoach', email = '[email protected]', role = c('ctb')), | ||
person('Tej', 'Seth', email = '[email protected]', role = c('ctb')), | ||
person('Conor','McQuiston', email = '[email protected]', role = c('ctb')), | ||
person('Tan', 'Ho', email = '[email protected]', role = c('ctb')) | ||
) | ||
Description: An R package for working with College Football Data. It is an R API wrapper around <https://collegefootballdata.com/> made available by the cfbfastR team. It provides users the capability to access a plethora of endpoints, and supplement that data with additional information (Expected Points Added/Win Probability added). | ||
Version: 1.1.0 | ||
Authors@R: | ||
c(person(given = "Saiem", | ||
family = "Gilani", | ||
role = c("cre", "aut"), | ||
email = "[email protected]"), | ||
person(given = "Akshay", | ||
family = "Easwaran", | ||
role = "aut", | ||
email = "[email protected]"), | ||
person(given = "Jared", | ||
family = "Lee", | ||
role = "aut", | ||
email = "[email protected]"), | ||
person(given = "Eric", | ||
family = "Hess", | ||
role = "aut", | ||
email = "[email protected]"), | ||
person(given = "Michael", | ||
family = "Egle", | ||
role = "ctb", | ||
email = "[email protected]"), | ||
person(given = "Nate", | ||
family = "Manzo", | ||
role = "ctb", | ||
email = "[email protected]"), | ||
person(given = "Jason", | ||
family = "DeLoach", | ||
role = "ctb", | ||
email = "[email protected]"), | ||
person(given = "Tej", | ||
family = "Seth", | ||
role = "ctb", | ||
email = "[email protected]"), | ||
person(given = "Conor", | ||
family = "McQuiston", | ||
role = "ctb", | ||
email = "[email protected]"), | ||
person(given = "Tan", | ||
family = "Ho", | ||
role = "ctb", | ||
email = "[email protected]")) | ||
Description: An R package for working with College Football Data. It is an | ||
R API wrapper around <https://collegefootballdata.com/> made available | ||
by the cfbfastR team. It provides users the capability to access a | ||
plethora of endpoints, and supplement that data with additional | ||
information (Expected Points Added/Win Probability added). | ||
License: MIT + file LICENSE | ||
URL: https://saiemgilani.github.io/cfbfastR/ (website), https://www.github.com/saiemgilani/cfbfastR (devel) | ||
URL: https://saiemgilani.github.io/cfbfastR, | ||
http://www.github.com/saiemgilani/cfbfastR | ||
BugReports: http://www.github.com/saiemgilani/cfbfastR/issues | ||
Encoding: UTF-8 | ||
Depends: | ||
R (>= 3.5.0) | ||
R (>= 3.5.0) | ||
Imports: | ||
assertthat, | ||
attempt, | ||
curl, | ||
dplyr, | ||
ggplot2, | ||
furrr, | ||
future, | ||
glue, | ||
httr, | ||
janitor, | ||
jsonlite, | ||
magrittr, | ||
mgcv (>= 1.8-33), | ||
nnet, | ||
purrr, | ||
nnet, | ||
progressr (>= 0.6.0), | ||
purrr (>= 0.3.0), | ||
rlang, | ||
stringi, | ||
stringr, | ||
tibble, | ||
tidyr, | ||
utils | ||
stringr (>= 1.3.0), | ||
tibble (>= 3.0), | ||
tidyr (>= 1.0.0), | ||
usethis (>= 1.6.0), | ||
xgboost (>= 1.1) | ||
Suggests: | ||
cli (>= 1.1.0), | ||
crayon (>= 1.3.4), | ||
curl, | ||
DBI, | ||
furrr, | ||
future, | ||
ggplot2, | ||
ggrepel, | ||
qs (>= 0.23.5), | ||
rmarkdown, | ||
RSQLite, | ||
testthat, | ||
ggrepel | ||
stats, | ||
testthat | ||
Encoding: UTF-8 | ||
LazyData: true | ||
RoxygenNote: 7.1.1 | ||
Roxygen: list(markdown = TRUE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
#' CFBD API Key Registration | ||
#' @description Save your API Key as a system environment variable `CFBD_API_KEY` | ||
#' @details To get access to an API key, follow the instructions at [https://collegefootballdata.com/key](https://collegefootballdata.com/key "Key Registration") | ||
#' | ||
#' @details To get access to an API key, follow the instructions at [https://collegefootballdata.com/key](https://collegefootballdata.com/key "Key Registration")\cr | ||
#' \cr | ||
#' **Using the key:** \cr | ||
#' | ||
#' You can save the key for consistent usage by adding \cr | ||
#' `CFBD_API_KEY=XXXX-YOUR-API-KEY-HERE-XXXXX` \cr | ||
#' to your .REnviron file (easily accessed via [**`usethis::edit_r_environ()`**](https://usethis.r-lib.org/reference/edit.html)).\cr | ||
#' \cr | ||
#' Run [**`usethis::edit_r_environ()`**](https://usethis.r-lib.org/reference/edit.html) and THEN paste the following in the new script that pops up (with**out** quotations)\cr | ||
#' ```r | ||
#' CFBD_API_KEY = XXXX-YOUR-API-KEY-HERE-XXXXX | ||
#' ``` | ||
#' For less consistent usage:\cr | ||
#' At the beginning of every session or within an R environment, save your API key as the environment variable `CFBD_API_KEY` (with quotations) using a command like the following.\cr | ||
#' ```{r} | ||
#' Sys.setenv(CFBD_API_KEY = "XXXX-YOUR-API-KEY-HERE-XXXXX") | ||
#' ``` | ||
#' @name register_cfbd | ||
NULL | ||
#' @rdname register_cfbd | ||
#' @export | ||
cfbd_key <- function () { | ||
|
||
cfbd_key <- function() { | ||
key <- Sys.getenv("CFBD_API_KEY") | ||
|
||
if (key == "") { | ||
return(NA_character_) | ||
} else { | ||
return(key) | ||
} | ||
|
||
} | ||
|
||
#' @rdname register_cfbd | ||
#' @export | ||
has_cfbd_key <- function () !is.na(cfbd_key()) | ||
has_cfbd_key <- function() !is.na(cfbd_key()) |
Oops, something went wrong.