Skip to content

Commit

Permalink
team logos internal data
Browse files Browse the repository at this point in the history
  • Loading branch information
saiemgilani committed Mar 24, 2022
1 parent 9b418f5 commit 8701238
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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**

Expand Down
18 changes: 18 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
42 changes: 42 additions & 0 deletions data-raw/data.R
Original file line number Diff line number Diff line change
@@ -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"
7 changes: 7 additions & 0 deletions data-raw/phf_teams.csv
Original file line number Diff line number Diff line change
@@ -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://github.com/raw/saiemgilani/fastRhockey-data/main/themes/phf_logos/bos.png
Buffalo Beauts,BUF,Beauts,Buffalo,#69B1E1,#2B2B2B,https://github.com/raw/saiemgilani/fastRhockey-data/main/themes/phf_logos/buf.png
Connecticut Whale,CTW,Whale,Connecticut,#2657AB,#13B04C,https://github.com/raw/saiemgilani/fastRhockey-data/main/themes/phf_logos/ctw.png
Metropolitan Riveters,MET,Riveters,Metropolitan,#EA1E27,#006291,https://github.com/raw/saiemgilani/fastRhockey-data/main/themes/phf_logos/met.png
Minnesota Whitecaps,MIN,Whitecaps,Minnesota,#6174B2,#231F20,https://github.com/raw/saiemgilani/fastRhockey-data/main/themes/phf_logos/min.png
Toronto Six,TOR,Six,Toronto,#EC1D23,#CAAC6E,https://github.com/raw/saiemgilani/fastRhockey-data/main/themes/phf_logos/tor.png
3 changes: 3 additions & 0 deletions data-raw/phf_teams_data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
phf_team_logos <- read.csv("data-raw/phf_teams.csv")

usethis::use_data(phf_team_logos,overwrite = TRUE)
Binary file added data/phf_team_logos.rda
Binary file not shown.
17 changes: 17 additions & 0 deletions man/data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8701238

Please sign in to comment.