Closed mrcaseb closed 1 month ago
We should try to update the raw json and see if the problems in playstats are fixed
I updated 2015_01_CAR_JAX
if you want to test
Comparing the two JSON files:
Initial Check-in had team as CAR for all stats:
Latest Check-in has JAX and CAR on their respective stats.
This is encouraging!
It is a known problem that some of the older Jaguars games have buggy raw json data where team names in playstats are always the opponent and never JAX or JAC.
We try to fix this with https://github.com/nflverse/nflfastR/blob/4b28a3e4a8ac36b52346da30d85db090cf9d9329/R/helper_scrape_nfl.R#L328-L377
However, there are two problems: 1.) This functions doesn't catch all
*_team
variables listed below2.) The current code is buggy as well. For example this play where DAL punted, the JAX returner muffed and lost the fumble, and DAL recovered. It is all mixed up
These problems potentially affect the following 120 games (all of these games have in common that there is no "JAX" or "JAC" in any playstat).
We should try to update the raw json and see if the problems in playstats are fixed. If that's the case, we need to make nflfastR skip these games by adjusting the following if statement https://github.com/nflverse/nflfastR/blob/4b28a3e4a8ac36b52346da30d85db090cf9d9329/R/helper_scrape_nfl.R#L99-L102