Skip to content
Open
116 changes: 58 additions & 58 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
Package: fastRhockey
Title: Functions to Access Premier Hockey Federation and National Hockey League Play by Play Data
Version: 0.4.1
Authors@R: c(
person(given = "Ben", family = "Howell", email = "benhowell71@gmail.com", role = c("aut")),
person(given = "Saiem", family = "Gilani", email = "saiem.gilani@gmail.com", role = c("cre", "aut")),
person(given = "Alyssa", family = "Longmuir", email = "aklongmuir@gmail.com", role = c("ctb"))
)
Description: A utility to scrape and load play-by-play data
and statistics from the Premier Hockey Federation (PHF) <https://www.premierhockeyfederation.com/>, formerly
known as the National Women's Hockey League (NWHL). Additionally, allows access to the National Hockey League's
stats API <https://www.nhl.com/>.
License: MIT + file LICENSE
URL: https://fastRhockey.sportsdataverse.org/,
https://github.com/sportsdataverse/fastRhockey
BugReports: https://github.com/sportsdataverse/fastRhockey/issues
Depends:
R (>= 4.0.0)
Imports:
cli (>= 3.0.0),
data.table,
dplyr,
glue,
httr,
janitor,
jsonlite,
lubridate,
magrittr,
progressr (>= 0.6.0),
purrr (>= 0.3.0),
Rcpp,
RcppParallel,
rlang,
rvest (>= 1.0.0),
stringr (>= 1.3.0),
tibble (>= 3.0),
tidyr (>= 1.0.0)
Suggests:
crayon (>= 1.3.4),
curl,
DBI,
furrr,
future,
ggplot2,
ggrepel,
qs (>= 0.25.1),
rmarkdown,
RSQLite,
stringi,
stats,
testthat,
usethis (>= 1.6.0),
xml2 (>= 1.3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1
Config/testthat/edition: 3
LazyData: true
Package: fastRhockey
Title: Functions to Access Premier Hockey Federation and National Hockey League Play by Play Data
Version: 0.4.1
Authors@R: c(
person(given = "Ben", family = "Howell", email = "benhowell71@gmail.com", role = c("aut")),
person(given = "Saiem", family = "Gilani", email = "saiem.gilani@gmail.com", role = c("cre", "aut")),
person(given = "Alyssa", family = "Longmuir", email = "aklongmuir@gmail.com", role = c("ctb"))
)
Description: A utility to scrape and load play-by-play data
and statistics from the Premier Hockey Federation (PHF) <https://www.premierhockeyfederation.com/>, formerly
known as the National Women's Hockey League (NWHL). Additionally, allows access to the National Hockey League's
stats API <https://www.nhl.com/>.
License: MIT + file LICENSE
URL: https://fastRhockey.sportsdataverse.org/,
https://github.com/sportsdataverse/fastRhockey
BugReports: https://github.com/sportsdataverse/fastRhockey/issues
Depends:
R (>= 4.0.0)
Imports:
cli (>= 3.0.0),
data.table,
dplyr,
glue,
httr,
janitor,
jsonlite,
lubridate,
magrittr,
progressr (>= 0.6.0),
purrr (>= 0.3.0),
Rcpp,
RcppParallel,
rlang,
rvest (>= 1.0.0),
stringr (>= 1.3.0),
tibble (>= 3.0),
tidyr (>= 1.0.0)
Suggests:
crayon (>= 1.3.4),
curl,
DBI,
furrr,
future,
ggplot2,
ggrepel,
qs (>= 0.25.1),
rmarkdown,
RSQLite,
stringi,
stats,
testthat,
usethis (>= 1.6.0),
xml2 (>= 1.3)
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Config/testthat/edition: 3
LazyData: true
22 changes: 22 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ export(phf_standings)
export(phf_team_box)
export(phf_team_roster)
export(phf_team_stats)
export(pwhpa_boxscore)
export(pwhpa_player_stats)
export(pwhpa_roster)
export(pwhpa_schedule)
export(pwhpa_standings)
export(pwhpa_team_player_stats)
export(update_nhl_db)
export(update_phf_db)
import(dplyr)
Expand All @@ -62,20 +68,24 @@ importFrom(RcppParallel,defaultNumThreads)
importFrom(data.table,data.table)
importFrom(data.table,fread)
importFrom(data.table,setDT)
importFrom(dplyr,across)
importFrom(dplyr,as_tibble)
importFrom(dplyr,bind_cols)
importFrom(dplyr,bind_rows)
importFrom(dplyr,case_when)
importFrom(dplyr,distinct)
importFrom(dplyr,ends_with)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,lead)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,mutate_at)
importFrom(dplyr,pull)
importFrom(dplyr,rename)
importFrom(dplyr,row_number)
importFrom(dplyr,select)
importFrom(dplyr,slice_head)
importFrom(dplyr,starts_with)
importFrom(dplyr,tibble)
importFrom(dplyr,ungroup)
Expand All @@ -91,12 +101,24 @@ importFrom(magrittr,"%>%")
importFrom(purrr,map_dfr)
importFrom(purrr,pluck)
importFrom(rlang,.data)
importFrom(rvest,html_attr)
importFrom(rvest,html_elements)
importFrom(rvest,html_node)
importFrom(rvest,html_nodes)
importFrom(rvest,html_text)
importFrom(rvest,read_html)
importFrom(scales,percent)
importFrom(stringr,str_detect)
importFrom(stringr,str_extract)
importFrom(stringr,str_extract_all)
importFrom(stringr,str_remove)
importFrom(stringr,str_remove_all)
importFrom(stringr,str_replace)
importFrom(stringr,str_replace_all)
importFrom(stringr,str_split)
importFrom(stringr,str_trim)
importFrom(tibble,as_tibble)
importFrom(tibble,rownames_to_column)
importFrom(tidyr,everything)
importFrom(tidyr,fill)
importFrom(tidyr,pivot_wider)
Expand Down
5 changes: 2 additions & 3 deletions R/helpers_phf.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ helper_phf_pbp_normalize_columns <- function(df){
}


#' @title phf_pbp_data
#' @description phf_pbp_data: returns all of the play-by-play data for a game into on big data frame using the process_phf_period/shootout functions. Contains functionality to account for regulation games, overtime games, and shootouts
#' @title helper_phf_pbp_data
#' @description helper_phf_pbp_data: returns all of the play-by-play data for a game into on big data frame using the process_phf_period/shootout functions. Contains functionality to account for regulation games, overtime games, and shootouts
#'
#' @param data the raw list data that is generated from the phf_game_raw function
#' @importFrom dplyr mutate bind_rows filter row_number select case_when pull starts_with ends_with
Expand All @@ -76,7 +76,6 @@ helper_phf_pbp_data <- function(data) {
abbreviations <- "TOR|MIN|BOS|CTW|MET|BUF|MON"
ne <- "On Ice"


pbp <- data %>%
dplyr::mutate(
team = stringr::str_replace(.data$team, abbreviations, ""),
Expand Down
Loading