nflverse / nfl_data_py

Python code for working with NFL play by play data.
MIT License
252 stars 48 forks source link

Separate import_pfr into weekly and seasonal methods #53

Closed alecglen closed 1 year ago

alecglen commented 1 year ago

Currently, import_pfr() returns one of two nflfastR datasets:

  1. /pfr_advstats/advstatsseason{stat_type} if a years list is not passed
  2. /pfr_advstats/advstatsseason{stattype}{year} if a years list is passed

Although they're organized under the same release, these files are generated from different PFR pages and the columns are not quite aligned. This can lead to confusion a la https://github.com/cooperdff/nfl_data_py/issues/50#issuecomment-1648118690.

I suggest that we break import_pfr into two endpoints: import_seasonal_pfr(s_type, years) and import_weekly_pfr(s_type, years). Doing that will help make the distinction more clear (and we can link to example PFR pages per method to help even more).