JaseZiv / worldfootballR_data

Project holding various data for the worldfootballR R package
62 stars 19 forks source link

Leave `tier` field for Cups? #18

Open tonyelhabr opened 5 months ago

tonyelhabr commented 5 months ago

@JaseZiv How do you feel about leaving the tier field as is for Cups (here)?

This way we can use "1st", "2nd", "3rd" to differentiate UEFA cups, for example (i.e. Champions League, Europa, Conference). I suppose we can differentiate between UEFA cups just with Competition.Name as well, but my idea is that I'd have UEFA_match_results.rds in the match_results release with the tier field as non-NA, and then have the tier field available when joining UEFA match results with other data sets.

tonyelhabr commented 5 months ago

here would be the affected rows in all_competitions.csv

# A tibble: 7 × 6
  competition_type        competition_name              governing_body country gender tier 
  <chr>                   <chr>                         <chr>          <chr>   <chr>  <chr>
1 Club International Cups Copa Libertadores de América  CONMEBOL       NA      M      1st  
2 Club International Cups Copa Sudamericana             CONMEBOL       NA      M      2nd  
3 Club International Cups UEFA Champions League         UEFA           NA      M      1st  
4 Club International Cups UEFA Europa League            UEFA           NA      M      2nd  
5 Club International Cups UEFA Europa Conference League UEFA           NA      M      3rd  
6 Club International Cups UEFA Women's Champions League UEFA           NA      F      1st  
7 Domestic Cups           Coupe de la Ligue             NA             FRA     M      1st
JaseZiv commented 5 months ago

I'm definitely not opposed to it @tonyelhabr, but as per this line of code you've referenced, the same problem would persist because of this Cup:

7 Domestic Cups           Coupe de la Ligue             NA             FRA     M      1st

Would we then just manually coerce country = NA?