From 5c3ae52da1e7ed9c590ffdd827de9ee87759e671 Mon Sep 17 00:00:00 2001 From: Petersen Date: Wed, 18 Sep 2024 17:11:53 -0500 Subject: [PATCH] 20240918 - script to download weekly projections --- download_weekly_projections.R | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/download_weekly_projections.R b/download_weekly_projections.R index 31bac59e5..b8ce1eeeb 100644 --- a/download_weekly_projections.R +++ b/download_weekly_projections.R @@ -1,5 +1,14 @@ # Download Weekly Projections +# Specify Season and Week Number ---- + +season <- 2024 +weekNumber <- 3 + +# Processing ---- +season <- as.character(season) +weekNumber <- as.character(weekNumber) + # Libraries ---- library("ffanalytics") library("tidyverse") @@ -71,7 +80,13 @@ players_projections_weekly_average <- players_projections_weekly_average %>% add_player_info() # Save Projected Points ---- + save( players_projectedPoints_weekly, players_projections_weekly_average, file = "./data/players_projectedPoints_weekly.RData" ) + +save( + players_projectedPoints_weekly, players_projections_weekly_average, + file = paste("./data/players_projectedPoints_weekly_", season, "_", "week", weekNumber, ".RData", sep = "") +)