-
Notifications
You must be signed in to change notification settings - Fork 100
Home
The update process for the projection_sources.rda
file should be as follows:
- Update
R/source_classes.R
if needed. If not, skip step 3. - Build package
- Run
data-raw/source_configs.R
(this script will updatedata/projection_sources.rda
) - Build package
The standard.rda
file is generated using the use_data function in the usethis package https://usethis.r-lib.org/reference/use_data.html
To update the standard.rda
(or sysdata.rds
?) file, you will have to update the ffanalytics:::player_ids
object and then rewrite it into the package with the use_data function. This is a bit labor intensive but allows for robust mapping of players to a common id. Add MFL IDs of the rookies that were added by MFL in the beginning of the season and then find the respective ids for the sources and add them in. (This can be done in a spreadsheet).
If you look at the results from running scrape_data you will see that some players will have values in the src_id
column but no value in the id
column. This would be the players that would need to be added/updated in the ffanalytics::::player_ids
object.
This player_directories
script will parse player directories for CBS, FFToday, Fantasypros and NFL. Make sure you load the ffanalytics
package first to have access to tidyverse
and rvest
. The command to create the sysdata.rda file is usethis::use_data(player_ids, overwrite = TRUE, internal = TRUE)
. This command needs to be executed from the package root folder.
f you want to do a quick check to see if there are new players that needs to be added to the ffanalytics:::player_ids
table then you can run player_table %>% filter(!(id %in% ffanalytics:::player_ids$id))