diff --git a/NEWS.md b/NEWS.md index 4a68bdb..926586a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # **fastRhockey 0.3.0** * Add print method for all functions with a time stamp and description of the data +* Add `phf_team_logos` dataset to package for reference # **fastRhockey 0.2.1** diff --git a/R/data.R b/R/data.R index 61ed5dd..1882c4c 100644 --- a/R/data.R +++ b/R/data.R @@ -22,3 +22,21 @@ NULL #' \item{team_color_alt2}{alternate logo secondary color} #' } "nhl_team_logos" + +#' @rdname data +#' @title **PHF Team logos & colors** +#' @description +#' A dataset containing the full team names, abbreviations, colors & logos +#' for all PHF teams. +#' @keywords data +#' @format A data frame with 6 rows and 7 variables: +#' \describe{ +#' \item{full_team_name}{Full team name} +#' \item{team_abbr}{PremierHockeyFederation.com team abbreviation} +#' \item{team_nick}{Team Nickname} +#' \item{team_location}{PHF team location} +#' \item{team_color1}{Current primary team color. Full disclosure, I just color picked from the logos} +#' \item{team_color2}{Current secondary team color. Full disclosure, I just color picked from the logos} +#' \item{team_logo}{Primary team logo from fastRhockey data repository} +#' } +"phf_team_logos" diff --git a/cran-comments.md b/cran-comments.md index 393345c..ea85497 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -4,6 +4,7 @@ This is a minor release that * Adds one function, ```espn_nhl_teams()``` * Updates examples per CRAN Request * Adds attributes to exported functions to include timestamps on print +* Adds package dataset `phf_team_logos` ## R CMD check results diff --git a/data-raw/data.R b/data-raw/data.R new file mode 100644 index 0000000..1882c4c --- /dev/null +++ b/data-raw/data.R @@ -0,0 +1,42 @@ +#' **Data in the package for reference** +#' @name data +NULL +#' @rdname data +#' @title **NHL Team logos & colors** +#' @description +#' A dataset containing the full team names, abbreviations, colors & logos +#' for all 32 NHL teams. +#' @keywords data +#' @format A data frame with 32 rows and 11 variables: +#' \describe{ +#' \item{full_team_name}{full team name} +#' \item{team_abbr}{NHL.com team abbreviation} +#' \item{team_nick}{lowercase, no spaces team nickname} +#' \item{division}{current NHL division} +#' \item{conference}{current NHL conference} +#' \item{team_logo_espn}{primary team logo from ESPN.com} +#' \item{team_color1}{current primary team color} +#' \item{team_color2}{current secondary team color} +#' \item{team_logo_alternate}{alternate or throwback logo} +#' \item{team_color_alt1}{alternate logo primary color} +#' \item{team_color_alt2}{alternate logo secondary color} +#' } +"nhl_team_logos" + +#' @rdname data +#' @title **PHF Team logos & colors** +#' @description +#' A dataset containing the full team names, abbreviations, colors & logos +#' for all PHF teams. +#' @keywords data +#' @format A data frame with 6 rows and 7 variables: +#' \describe{ +#' \item{full_team_name}{Full team name} +#' \item{team_abbr}{PremierHockeyFederation.com team abbreviation} +#' \item{team_nick}{Team Nickname} +#' \item{team_location}{PHF team location} +#' \item{team_color1}{Current primary team color. Full disclosure, I just color picked from the logos} +#' \item{team_color2}{Current secondary team color. Full disclosure, I just color picked from the logos} +#' \item{team_logo}{Primary team logo from fastRhockey data repository} +#' } +"phf_team_logos" diff --git a/data-raw/phf_teams.csv b/data-raw/phf_teams.csv new file mode 100644 index 0000000..243d7c5 --- /dev/null +++ b/data-raw/phf_teams.csv @@ -0,0 +1,7 @@ +full_team_name,team_abbr,team_nick,team_location,team_color1,team_color2,team_logo +Boston Pride,BOS,Pride,Boston,#FEC52E,#000000,https://raw.githubusercontent.com/saiemgilani/fastRhockey-data/main/themes/phf_logos/bos.png +Buffalo Beauts,BUF,Beauts,Buffalo,#69B1E1,#2B2B2B,https://raw.githubusercontent.com/saiemgilani/fastRhockey-data/main/themes/phf_logos/buf.png +Connecticut Whale,CTW,Whale,Connecticut,#2657AB,#13B04C,https://raw.githubusercontent.com/saiemgilani/fastRhockey-data/main/themes/phf_logos/ctw.png +Metropolitan Riveters,MET,Riveters,Metropolitan,#EA1E27,#006291,https://raw.githubusercontent.com/saiemgilani/fastRhockey-data/main/themes/phf_logos/met.png +Minnesota Whitecaps,MIN,Whitecaps,Minnesota,#6174B2,#231F20,https://raw.githubusercontent.com/saiemgilani/fastRhockey-data/main/themes/phf_logos/min.png +Toronto Six,TOR,Six,Toronto,#EC1D23,#CAAC6E,https://raw.githubusercontent.com/saiemgilani/fastRhockey-data/main/themes/phf_logos/tor.png diff --git a/data-raw/phf_teams_data.R b/data-raw/phf_teams_data.R new file mode 100644 index 0000000..1cf5105 --- /dev/null +++ b/data-raw/phf_teams_data.R @@ -0,0 +1,3 @@ +phf_team_logos <- read.csv("data-raw/phf_teams.csv") + +usethis::use_data(phf_team_logos,overwrite = TRUE) diff --git a/data/phf_team_logos.rda b/data/phf_team_logos.rda new file mode 100644 index 0000000..72bfdf9 Binary files /dev/null and b/data/phf_team_logos.rda differ diff --git a/man/data.Rd b/man/data.Rd index b950368..ac7ddeb 100644 --- a/man/data.Rd +++ b/man/data.Rd @@ -4,6 +4,7 @@ \name{data} \alias{data} \alias{nhl_team_logos} +\alias{phf_team_logos} \title{\strong{Data in the package for reference}} \format{ A data frame with 32 rows and 11 variables: @@ -20,12 +21,28 @@ A data frame with 32 rows and 11 variables: \item{team_color_alt1}{alternate logo primary color} \item{team_color_alt2}{alternate logo secondary color} } + +A data frame with 6 rows and 7 variables: +\describe{ +\item{full_team_name}{Full team name} +\item{team_abbr}{PremierHockeyFederation.com team abbreviation} +\item{team_nick}{Team Nickname} +\item{team_location}{PHF team location} +\item{team_color1}{Current primary team color. Full disclosure, I just color picked from the logos} +\item{team_color2}{Current secondary team color. Full disclosure, I just color picked from the logos} +\item{team_logo}{Primary team logo from fastRhockey data repository} +} } \usage{ nhl_team_logos + +phf_team_logos } \description{ A dataset containing the full team names, abbreviations, colors & logos for all 32 NHL teams. + +A dataset containing the full team names, abbreviations, colors & logos +for all PHF teams. } \keyword{data}