nfl_data_py icon indicating copy to clipboard operation
nfl_data_py copied to clipboard

[BUG] import_schedule shows wrong week for rest

Open darkhark opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Have you installed the latest development version of the package(s) in question?

  • [X] I have installed the latest development version of the package.

If this is a data issue, have you tried clearing your nflverse cache?

I am not using an nflverse R package (nflreadr, nflfastR) to access this data.

What version of the package do you have?

0.3.1

Describe the bug

If the home_rest and away_rest columns are meant to represent each team's bye weeks, they appear to default to 7. This is for week 1: image The rest value changes depending on the week for the same teams too.

Reprex

import nfl_data_py as nfl
nfl.import_schedules([2023])[['away_team', 'home_team', 'away_rest', 'home_rest']]

Expected Behavior

The values in rest week show the same bye week for the same team no matter the week.

nflverse_sitrep

NA

Screenshots

Added to description

Additional context

Not urgent, but I planned on imputing values using the bye week.

darkhark avatar Apr 01 '24 00:04 darkhark

is there anyone working on this? If not, I can take it up

smenon02 avatar Apr 02 '24 15:04 smenon02

is there anyone working on this? If not, I can take it up

You're the first reply. Feel free to go for it!

darkhark avatar Apr 02 '24 16:04 darkhark

These columns look like they represent the days of rest for each team going into that game. not the bye week. Is that not the intended use of these columns? Should I be calculating days rest differently?

nateb7722 avatar Sep 19 '24 16:09 nateb7722

image https://nflreadr.nflverse.com/articles/dictionary_schedules.html

this is indeed days of rest for home/away team (i.e. number of days since last game before the game date)

tanho63 avatar Sep 19 '24 16:09 tanho63

Awesome, thank you for the clarification!

darkhark avatar Sep 19 '24 17:09 darkhark