sportsdataverse/cfbfastR

Play by play for data 2013 and before

rchanks opened this issue · 1 comments

Describe the bug
When using the cfbd_pbp_data for any data before 2014, I am getting errors.

When running the following:
Input:
tmp <- tibble()
wk <- 3
seas <- "regular"
yr <- 2013
tmp <- cfbd_pbp_data(yr, seas, wk, team = NULL, play_type = NULL, epa_wpa = TRUE), it returns the following error:

Error:
Error in predict.nnet(object, X) : missing values in 'x'
In addition: Warning messages:
1: In log(dat$new_distance[neg_distance]) : NaNs produced
2: In log(dat$new_distance[neg_distance]) : NaNs produced
3: In log(dat$new_distance[neg_distance]) : NaNs produced
4: In log(dat$new_distance[neg_distance]) : NaNs produced
5: In log(dat$new_distance[neg_distance]) : NaNs produced
6: In log(dat$new_distance[neg_distance]) : NaNs produced

Sometimes another error is produced:
Input:
tmp <- tibble()
wk <- 1
seas <- "regular"
yr <- 2012
tmp <- cfbd_pbp_data(yr, seas, wk, team = NULL, play_type = NULL, epa_wpa = TRUE)

Error:
Error in predict.nnet(object, X) : missing values in 'x'
In addition: There were 20 warnings (use warnings() to see them)

Thanks for bringing it up, but this is a known issue. I am working on a fix to get all the data going back to the start. Will not be forever but another week or two.