Skip to content

Commit

Permalink
Describe variable name differences
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Nov 10, 2024
1 parent 457e5d6 commit ea1fa2c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions vignettes/stats_variables.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ with_dt <- requireNamespace("DT")
```

Below you will find a table that lists and explains all the variables available in `calculate_stats()`. Compared to the old `calculate_player_stats*()` functions that have been deprecated, practically all variables (and their names) have been preserved. However, there are a few differences. These are

- `recent_team`: renamed to `team` (recent team in weekly data never made sense)
- `interceptions`: renamed to `passing_interceptions` (all passing stats have the passing prefix)
- `sacks`: renamed to `sacks_suffered` (to make clear it's not on defensive side)
- `sack_yards`: renamed to `sack_yards_lost` (to make clear it's not on defensive side)
- `dakota`: not implemented at the moment
- `def_tackles`: there is `def_tackles_solo` and `def_tackles_with_assist`
- `def_fumble_recovery_own`: renamed to `fumble_recovery_own` (it is not exclusive to defense)
- `def_fumble_recovery_yards_own`: renamed to `fumble_recovery_yards_own` (it is not exclusive to defense)
- `def_fumble_recovery_opp`: renamed to `fumble_recovery_opp` (it is not exclusive to defense)
- `def_fumble_recovery_yards_opp`: renamed to `fumble_recovery_yards_opp` (it is not exclusive to defense)
- `def_safety`: renamed to `def_safeties` (we use plural everywhere)
- `def_penalty`: renamed to `penalties` (it is not exclusive to defense)
- `def_penalty_yards`: renamed to `penalty_yards` (it is not exclusive to defense)

```{r eval = with_dt}
DT::datatable(nflfastR::nfl_stats_variables,options = list(scrollX = TRUE, pageLength = 25), filter = "top", rownames = FALSE)
```
Expand Down

0 comments on commit ea1fa2c

Please sign in to comment.