library(tidyverse)
library(janitor)
library(worldfootballR)
FBref scores & schedules
The aim is to pull data from a page like this: 2023 Scores and Fixtures
this uses the worldfootballr package and mainly the fb_match_results
- Figure out how to get one year
- Figure out how to save to computer
- Figure out how to do multiple years
Setup
Match results function
This is our jam.
Match results
<- fb_match_results(
mls_2024 country = "USA",
gender = "M",
season_end_year = 2023,
tier = "1st"
|> clean_names()
)
mls_2024
Austin sellout?
Interestingly, there is no Attendance reported for the final Austin FC home game in 2024.
|>
mls_2024 filter(home == "Austin")
|> filter(is.na(attendance), round == "Regular Season") |>
mls_2024 select(round, wk, date, home, away, attendance, venue) |>
arrange(date)