Skip to content

Commit

Permalink
Merge pull request #9 from saiemgilani/doc-org
Browse files Browse the repository at this point in the history
Added headshot_url to outputs of cfbd_team_rosters

Renamed returns in cfbd_game_advanced():

rushing_line_yd_avg to plural rushing_line_yds_avg
rushing_second_lvl_yd_avg to plural rushing_second_lvl_yds_avg
rushing_open_field_yd_avg to plural rushing_open_field_yds_avg
Completed documentation for all returns except cfbd_pbp_data()

Continued work on intro vignette

closes #8

removes internal functions from function index
  • Loading branch information
saiemgilani authored Apr 24, 2021
2 parents 6892e4d + ae7c850 commit dffc085
Show file tree
Hide file tree
Showing 19 changed files with 1,022 additions and 963 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cfbfastR
Title: Functions to Access College Football Play by Play Data
Version: 1.2.0
Version: 1.2.1
Authors@R:
c(person(given = "Saiem",
family = "Gilani",
Expand Down
16 changes: 15 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# cfbfastR

### **v1.2.0**
### **v1.2.1**
##### **Minor release**

* Added headshot_url to outputs of [```cfbd_team_rosters```](https://saiemgilani.github.io/cfbfastR/reference/cfbd_teams.html)

* Renamed returns in [```cfbd_game_advanced()```](https://saiemgilani.github.io/cfbfastR/reference/cfbd_games.html):
- `rushing_line_yd_avg` to plural `rushing_line_yds_avg`
- `rushing_second_lvl_yd_avg` to plural `rushing_second_lvl_yds_avg`
- `rushing_open_field_yd_avg` to plural `rushing_open_field_yds_avg`

* Completed documentation for all returns except ```cfbd_pbp_data()```

* Continued work on intro vignette

### **v1.2.0-1**
#### **Add significant documentation to the package**

* Added mini-vignettes pertaining to CFB Data functionality:
Expand Down
421 changes: 213 additions & 208 deletions R/cfbd_games.R

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion R/cfbd_players.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @description
#' \describe{
#' \item{`cfbd_player_info()`:}{Player Information Search.}
#' \item{`cfbd_player_returning()`:}{Player Returning Production}
#' \item{`cfbd_player_returning()`:}{Player Returning Production.}
#' \item{`cfbd_player_usage()`:}{Player Usage.}
#' }
#' @param search_term (\emph{String} required): Search term for the player you are trying to look up
Expand Down
8 changes: 4 additions & 4 deletions R/cfbd_ratings.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#' @title CFBD Ratings and Rankings Endpoints
#' @description
#' \describe{
#' \item{`cfbd_rankings()`: Gets Historical CFB poll rankings at a specific week}{.}
#' \item{`cfbd_ratings_sp()`: Get SP historical rating data}{.}
#' \item{`cfbd_ratings_sp_conference()`: Get SP conference-level historical rating data}{.}
#' \item{`cfbd_ratings_srs()`: Get SRS historical rating data}{.}
#' \item{`cfbd_rankings()`:}{Gets Historical CFB poll rankings at a specific week.}
#' \item{`cfbd_ratings_sp()`:}{Get SP historical rating data.}
#' \item{`cfbd_ratings_sp_conference()`:}{Get SP conference-level historical rating data.}
#' \item{`cfbd_ratings_srs()`:}{Get SRS historical rating data.}
#' }
#' @param year (\emph{Integer} required): Year, 4 digit format (\emph{YYYY})
#' @param week (\emph{Integer} optional): Week, values from 1-15, 1-14 for seasons pre-playoff (i.e. 2013 or earlier)
Expand Down
6 changes: 3 additions & 3 deletions R/cfbd_recruiting.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#' @title CFB Recruiting Endpoint
#' @description
#' \describe{
#' \item{`cfbd_recruiting_player()`: Gets CFB recruiting information for a single year with filters available for team, recruit type, state and position.}{}
#' \item{`cfbd_recruiting_player()`:}{Gets CFB recruiting information for a single year with filters available for team, recruit type, state and position.}
#'
#' \item{`cfbd_recruiting_position()`: CFB Recruiting Information Position Groups.}{}
#' \item{`cfbd_recruiting_position()`:}{CFB Recruiting Information Position Groups.}
#'
#' \item{`cfbd_recruiting_team()`: CFB Recruiting Information Team Rankings.}{}
#' \item{`cfbd_recruiting_team()`:}{CFB Recruiting Information Team Rankings.}
#' }
#'
#' @details
Expand Down
500 changes: 249 additions & 251 deletions R/cfbd_stats.R

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions R/cfbd_teams.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#' @title CFBD Teams Endpoint
#' @description
#' \describe{
#' \item{`cfbd_team_info()`: Team Info Lookup}{.}
#' \item{`cfbd_team_matchup_records()`: Get matchup history records between two teams.}{.}
#' \item{`cfbd_team_matchup()`: Get matchup history between two teams.}{.}
#' \item{`cfbd_team_roster()`: Get a team's full roster by year.}{.}
#' \item{`cfbd_team_talent()`: Get composite team talent rankings for all teams in a given year}{.}
#' \item{`cfbd_team_info()`:}{Team Info Lookup.}
#' \item{`cfbd_team_matchup_records()`:}{Get matchup history records between two teams.}
#' \item{`cfbd_team_matchup()`:}{Get matchup history between two teams.}
#' \item{`cfbd_team_roster()`:}{Get a team's full roster by year.}
#' \item{`cfbd_team_talent()`:}{Get composite team talent rankings for all teams in a given year.}
#' }
#' ## Team Info Lookup
#' Lists all teams in conference or all D-I teams if conference is left NULL
Expand Down Expand Up @@ -468,6 +468,7 @@ cfbd_team_matchup <- function(team1, team2, min_year = NULL, max_year = NULL,
#' \item{`home_latitude`: numeric.}{Hometown latitude.}
#' \item{`home_longitude`: number.}{Hometown longitude.}
#' \item{`home_county_fips`: integer.}{Hometown FIPS code.}
#' \item{`headshot_url`: character}{Player ESPN headshot url.}
#' }
#' @source \url{https://api.collegefootballdata.com/roster}
#' @keywords Team Roster
Expand Down Expand Up @@ -535,9 +536,7 @@ cfbd_team_roster <- function(year, team = NULL,
httr::content(as = "text", encoding = "UTF-8") %>%
jsonlite::fromJSON() %>%
dplyr::rename(athlete_id = .data$id) %>%
# Is this okay to just comment out?
# Changing to team = NULL deleted the column
# dplyr::mutate(team = team2) %>%
dplyr::mutate(headshot_url = paste0("https://a.espncdn.com/i/headshots/college-football/players/full/",.data$athlete_id,".png")) %>%
as.data.frame()

if(verbose){
Expand Down
14 changes: 14 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@ devtools::install_github(repo = "saiemgilani/cfbfastR")

## **Breaking Changes**

### **v1.2.1**
##### **Minor release**

* Added headshot_url to outputs of [```cfbd_team_rosters```](https://saiemgilani.github.io/cfbfastR/reference/cfbd_teams.html)

* Renamed returns in [```cfbd_game_advanced()```](https://saiemgilani.github.io/cfbfastR/reference/cfbd_games.html):
- `rushing_line_yd_avg` to plural `rushing_line_yds_avg`
- `rushing_second_lvl_yd_avg` to plural `rushing_second_lvl_yds_avg`
- `rushing_open_field_yd_avg` to plural `rushing_open_field_yds_avg`

* Completed documentation for all returns except ```cfbd_pbp_data()```

* Continued work on intro vignette

### **v1.2.0**
#### **Add significant documentation to the package**

Expand Down
4 changes: 2 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ reference:
- '`cfbd_venues`'
- '`cfbd_conferences`'
- '`cfbd_coaches`'
- subtitle: Internals
desc: Internal functions and helpers
- subtitle: Model functions and PBP helpers
desc: Model functions and play-by-play helpers
contents:
- '`create_epa`'
- '`create_wpa`'
Expand Down
Loading

0 comments on commit dffc085

Please sign in to comment.