sportsdataverse / cfbfastR

An R package to quickly obtain clean and tidy college football play by play data
https://cfbfastR.sportsdataverse.org
Other
74 stars 8 forks source link

Precalculate cfbd_pbp_data epa/wpa values to speed up data loading #101

Open soricinae opened 5 months ago

soricinae commented 5 months ago

Is your feature request related to a problem? Please describe. Today when I want epa or wpa data, I call cfbd_pbp_data for each week, sometimes going back several seasons. For each week, epa/wpa numbers are calculated by the function call, taking a minute or more per week.

Describe the solution you'd like Precalculate the epa/wpa numbers and store them with the base data coming from the API. So when I call cfbd_pbp_data it only takes a few seconds to download the data from the API.

Describe alternatives you've considered N/A

Additional context nflfastr precalculates epa/wpa numbers which makes it quicker to get historical data.

akeaswaran commented 5 months ago

We should support this already via cfbfastR::load_cfb_pbp(). Have you tried that yet?