Skip to content

Commit 004c22b

Browse files
committed
add ratings image back to code.
1 parent 82595d1 commit 004c22b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

R/main.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ dailySummary <- function(graphic_dir = "./prediction_results/graphics", subdir =
204204
)
205205
)
206206

207-
208207
# rtoot::post_toot(
209208
# status = "Predicted odds for today's #NHL games.",
210209
# media = file.path(graphic_dir, "today_odds.png"),
@@ -218,6 +217,14 @@ dailySummary <- function(graphic_dir = "./prediction_results/graphics", subdir =
218217
)
219218
)
220219

220+
rating <- ratings(params$m)
221+
# save to files.
222+
grDevices::png(filename = file.path(graphic_dir, "current_rating.png"), width = 11, height = 8.5, units = "in", res = 300)
223+
print(rating)
224+
Sys.sleep(5)
225+
while (grDevices::dev.cur() != 1) {
226+
grDevices::dev.off()
227+
}
221228

222229
# rtoot::post_toot(
223230
# status = paste0("Current team ratings (as of ", Sys.Date(), ")."),

0 commit comments

Comments
 (0)