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
mls_2024 <- fb_match_results(
country = "USA",
gender = "M",
season_end_year = 2023,
tier = "1st"
) |> clean_names()
mls_2024Austin sellout?
Interestingly, there is no Attendance reported for the final Austin FC home game in 2024.
mls_2024 |>
filter(home == "Austin")mls_2024 |> filter(is.na(attendance), round == "Regular Season") |>
select(round, wk, date, home, away, attendance, venue) |>
arrange(date)