library(tidyverse)
library(praise)
London Marathon
The Data
The data this week comes from Nicola Rennie’s LondonMarathon R package. This is an R package containing two data sets scraped from Wikipedia (1 November 2022) on London Marathon winners, and some general data. How the dataset was created, and some analysis, is described in Nicola’s post “Scraping London Marathon data with {rvest}”. Thank you for putting this dataset together @nrennie!
<- readr::read_csv("london_marathon.csv")
marathon <- readr::read_csv("winners.csv") winners
%>%
winners filter(Year >= 1990) %>%
ggplot(aes(x = Year, y = Time, color = Category)) +
geom_line() +
ylab("") +
ggtitle("Winning Marathon Time")
%>%
marathon pivot_longer(Accepted:Finishers, names_to = "runners", values_to = "count") %>%
ggplot(aes(x = Year, y = count, color = runners)) +
geom_line() +
ylab("") +
ggtitle("Runners")