Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add roster status descriptor #232 #243

Merged
merged 3 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: nflreadr
Title: Download 'nflverse' Data
Version: 1.4.1.02
Version: 1.4.1.03
Authors@R: c(
person("Tan", "Ho", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8388-5155")),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- nflreadr now exports the variable `nflreadr::nflverse_data_timezone` which defines the standard timezone
across all nflverse data. When printing to the console, nflreadr will convert timestamps to the user local timezone.
- Added several player name mappings (#249, #253)
- Added a dictionary to describe what each shorthand roster status indicates (#232)

---

Expand Down
5 changes: 5 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,8 @@
#' A character string defining the default timezone for data across the nflverse
#'
"nflverse_data_timezone"

#' dictionary_roster_status
#'
#' A dictionary translating the shorthand roster status to more verbose explanations of what each status indicates.
"dictionary_roster_status"
4 changes: 4 additions & 0 deletions data-raw/build_data_dictionaries.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ dictionary_participation <- read.csv("data-raw/dictionary_participation.csv") |>
dplyr::mutate_all(stringr::str_squish)
usethis::use_data(dictionary_participation, overwrite = TRUE)

dictionary_roster_status <- read.csv("data-raw/dictionary_roster_status.csv") |>
dplyr::mutate_all(stringr::str_squish)
usethis::use_data(dictionary_roster_status, overwrite = TRUE)

20 changes: 20 additions & 0 deletions data-raw/dictionary_roster_status.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
status,description
ACT,On the active roster
EXE,On the comissioner's exempt list
DEV,On the practice squad
CUT,Cut from the team's roster
E14,On the roster as an exempt international player. See https://www.nfl.com/news/what-is-the-international-player-pathway for details
INA,"Under contract but not on the active roster, inactive"
NWT,"Rarely used, tends to indicate a waived player"
PUP,"On the ""Physically Unable to Perform"" list"
RES,On the reserve list
RET,On the retired from football list
RFA,"Rarely used, tends to indicate a cut player who is a restricted free agent."
RSN,"Rarely used, tends to indicate a player is on the non-football injured reserve list"
RSR,"Rarely used, tends to indicate a player released from being on the injured reserve list"
SUS,Player is suspended from the NFL
TRC,Player has been released from the practice squad
TRD,Player has been released from the practice squad
TRL,Rarely used and only for a brief period in the 1960s. Unable to determine what the status indicates.
TRT,Player has been released from the practice squad
UFA,Player has been released and is an unrestricted free agent
20 changes: 16 additions & 4 deletions data-raw/dictionary_rosters.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,25 @@ weight,character,"Official weight, in pounds"
college,character,Official college (usually the last one attended)
high_school,character,High school
gsis_id,character,Game Stats and Info Service ID: the primary ID for play-by-play data.
headshot_url,character,A URL string that points to player photos used by NFL.com (or sometimes ESPN)
sleeper_id,character,Player ID for Sleeper API
espn_id,numeric,Player ID for ESPN API
sportradar_id,character,Player ID for Sportradar API
yahoo_id,numeric,Player ID for Yahoo API
rotowire_id,numeric,Player ID for Rotowire
pff_id,numeric,Player ID for Pro Football Focus
pfr_id,character,Player ID for Pro Football Reference
fantasy_data_id,numeric,Player ID for FantasyData
sleeper_id,character,Player ID for Sleeper API
years_exp,numeric,Years played in league
sportradar_id,character,Player ID for Sportradar API
pfr_id,character,Player ID for Pro Football Reference
headshot_url,character,A URL string that points to player photos used by NFL.com (or sometimes ESPN)
ngs_position,character,Primary position as reported by the NextGen stats API.
week,numeric,The most recent week of that season that a player appeared on the roster.
game_type,character,The most recent game type of that season that a player appeared on the roster.
status_description_abbr,character,A code corresponding to a particular NFL status.
football_name,character,The nickname or first name typically used by a player.
esb_id,character,Player ID for Elias Sports Bureau
gsis_it_id,numeric,Player ID for the GSIS IT API
smart_id,character,Player ID hash for a player's ESB ID
entry_year,numeric,The year a player first became eligible to play in the NFL.
rookie_year,numeric,The year a player lost their rookie eligibility.
draft_club,character,The team that originally drafted a player. NA if a player went undrafted in their draft-eligible year.
draft_number,numeric,The number pick that was used to select a given player.
Binary file added data/dictionary_roster_status.rda
Binary file not shown.
8 changes: 4 additions & 4 deletions man/csv_from_url.Rd

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

16 changes: 16 additions & 0 deletions man/dictionary_roster_status.Rd

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

20 changes: 20 additions & 0 deletions vignettes/dictionary_roster_status.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "Data Dictionary - Roster Status"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Data Dictionary - Roster Status}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
echo = FALSE,
comment = "#>"
)
```

```{r}
knitr::kable(nflreadr::dictionary_roster_status)
```
Loading