Skip to content

Commit

Permalink
update 2023-10-29
Browse files Browse the repository at this point in the history
  • Loading branch information
bydata committed Oct 30, 2023
1 parent 1a5c24b commit e922a60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions haaland/haaland-premier-league-road-to-50.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ match_logs_prep_haaland_last_match <- match_logs_prep_haaland %>%
mutate(Player_facet = factor(
Player, levels = c("Erling Haaland", matches_needed_to_score_50$Player)))

haaland_color <- "#4BC07E" #"#18dc82"
haaland_color <- "#4BC07E"

match_logs_prep %>%
inner_join(matches_needed_to_score_50,
Expand Down Expand Up @@ -190,10 +190,10 @@ match_logs_prep %>%
subtitle = sprintf("Haaland has scored %d goals in %d appearances (%1.2f goals per match).
The current record holder is Andy Cole who needed 65 matches to
reach 50 Premier League goals.
Haaland would still beat Cole's record if he needed 23 matches to score 6 more goals
(0.26 goals per match - a quarter of his currrent goal scoring rate).",
match_logs_prep_haaland_last_match$match_id,
Haaland would still beat Cole's record if he needed 19 matches to score 3 more goals
(0.16 goals per match - less than a sixth of his currrent goal scoring rate).",
match_logs_prep_haaland_last_match$goals_cumul,
match_logs_prep_haaland_last_match$match_id,
match_logs_prep_haaland_last_match$goals_cumul /
match_logs_prep_haaland_last_match$match_id

Expand All @@ -213,13 +213,13 @@ match_logs_prep %>%
plot.subtitle = element_textbox(width = 0.95),
plot.title.position = "plot"
)
ggsave(here(base_path, "haaland-pl-fastest-to-score-50-goals-20231008.png"),
ggsave(here(base_path, "haaland-pl-fastest-to-score-50-goals-20231029.png"),
width = 8, height = 7)



## how many goals had the other played scored after x matches?
match_logs_prep %>%
filter(match_id == 41) %>%
filter(match_id == 45) %>%
select(Player, goals_cumul) %>%
arrange(-goals_cumul)

0 comments on commit e922a60

Please sign in to comment.