Skip to contents

This has essentially the same as the matches data; here, a row is returned for every combination of team and match. Thus there are two rows returned for each row in the data_matches tibble: one for each team.

Usage

uss_make_teams_matches(data_matches)

Arguments

data_matches

data.frame created using uss_get_matches() or uss_make_matches()

Value

tibble with columns country, tier, season, team, date, opponent, at_home, goals_for, goals_against; ordered by country, tier, season, team, date.

Examples

uss_get_matches("england") |>
  uss_make_teams_matches() |>
  dplyr::filter(team == "Leeds United") |>
  tail()
#> # A tibble: 6 × 9
#>   country tier  season team         date       at_home opponent  goals…¹ goals…²
#>   <chr>   <fct>  <int> <chr>        <date>     <lgl>   <chr>       <int>   <int>
#> 1 England 2       2015 Leeds United 2016-03-08 FALSE   Cardiff …       2       0
#> 2 England 2       2015 Leeds United 2016-03-12 FALSE   Blackbur…       2       1
#> 3 England 2       2015 Leeds United 2016-04-02 FALSE   Rotherha…       1       2
#> 4 England 2       2015 Leeds United 2016-04-09 FALSE   Burnley         0       1
#> 5 England 2       2015 Leeds United 2016-04-23 FALSE   Hull City       2       2
#> 6 England 2       2015 Leeds United 2016-05-07 FALSE   Preston …       1       1
#> # … with abbreviated variable names ¹​goals_for, ²​goals_against