Skip to content

Commit

Permalink
Fill punter info on blocked punts
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Mar 28, 2024
1 parent 7ae3613 commit b05711c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: nflfastR
Title: Functions to Efficiently Access NFL Play by Play Data
Version: 4.6.1.9007
Version: 4.6.1.9008
Authors@R:
c(person(given = "Sebastian",
family = "Carl",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Fixed play description in some 1999 and 2000 games where the string "D.Holland" replaced the kick distance. (#459)
- Fixed a problem where the `goal_to_go` variable was `FALSE` in actual goal to go situations. (#460)
- Fixed a bug in `fixed_drive` and `fixed_drive_result` where the second weather delay in `2023_13_ARI_PIT` wasn't identified correctly. (#461)
- `punter_player_id`, and `punter_player_name` are filled for blocked punt attempts. (#463)

# nflfastR 4.6.1

Expand Down
3 changes: 3 additions & 0 deletions R/helper_tidy_play_stats.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ sum_play_stats <- function(play_Id, stats) {
row$punt_blocked <- 1
row$punt_attempt <- 1
row$kick_distance <- play_stats$yards[index]
row$punter_player_id <- play_stats$player.esbId[index]
row$punter_player_name <- play_stats$player.displayName[index]
} else if (stat_id == 3) {
row$first_down_rush <- 1
} else if (stat_id == 4) {
Expand Down Expand Up @@ -1285,6 +1287,7 @@ sum_play_stats <- function(play_Id, stats) {
row$extra_point_aborted <- 1
row$extra_point_attempt <- 1
} else if (stat_id == 402) {
# tackle for loss player information is recorded in stat id 120
NULL
} else if (stat_id == 403) {
row$defensive_two_point_attempt <- 1
Expand Down

0 comments on commit b05711c

Please sign in to comment.