library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
soccer_matches <-read.csv('soccer-spi/spi_matches.csv')

#function that basically filters each team from the soccer_matches data set and
#determines whether they won or lost and returns a subset of that particular teams data
individual_team_wl <- function(team_name){
  
  #create subset of the data based on team being team 1
  df_t1 <- subset(soccer_matches, (date <= Sys.Date()) & (team1 == team_name),
                  select=-c(league_id,league,team2,spi2,prob2,proj_score1,proj_score2,importance1,importance2,xg1,xg2,adj_score1,adj_score2,nsxg1,nsxg2))
  
  #create subset of the data based on team being team 2
  df_t2 <- subset(soccer_matches, (date <= Sys.Date()) & (team2 == team_name),
                  select=-c(league_id,league,team1,spi1,prob1,proj_score1,proj_score2,importance1,importance2,xg1,xg2,adj_score1,adj_score2,nsxg1,nsxg2))
  
  #determine whether team as team1 won,lost or tied
  df_t1 <- df_t1 %>% mutate( win_loss = case_when(
    team1 == team_name & (score1 > score2) ~ 'win',
    team1 == team_name & (score1 < score2) ~ 'loss',
    team1 == team_name & (score1 == score2) ~ 'tie',
  )
  )
  ##determine whether team as team2 won,lost or tied
  df_t2 <- df_t2 %>% mutate( win_loss = case_when(
    team2 == team_name & (score1 < score2) ~ 'win',
    team2 == team_name & (score1 > score2) ~ 'loss',
    team2 == team_name & (score1 == score2) ~ 'tie',
  )
  )
  
  #list of column names and replacement names for binding 
  t1_colnames_list <- c('team'='team1','rating'='spi1','prob_team_win'='prob1' )
  
  #call to df.rename.cols to rename multiple columns in soccer_match data
  #creating a common data frame format for seamless binding
  df_t1 <- df_t1 %>%
    rename(all_of(t1_colnames_list))
  
  #list of column names and replacement names for binding
  t2_colnames_list <- c('team'='team2','rating'='spi2','prob_team_win'='prob2' )
  
  #call to df.rename.cols to rename multiple columns in soccer_match data
  #creating a common data frame format for seamless binding
  df_t2 <- df_t2 %>%
    rename(all_of(t2_colnames_list))
  
  #bind both team 1 and team2 dataframes into one dataframe
  team_name_wl <-rbind(df_t1,df_t2)
  
  #make sure final index is ordered based on the individual team data
  row.names(team_name_wl) <- NULL
  
  #return the final combined data
  return (team_name_wl)
}

#test if data.frame is unique to team name and if data frame has win, lose, tie data
individual_team_wl('Chelsea')
##     season       date    team rating prob_team_win probtie score1 score2
## 1     2016 2016-08-15 Chelsea  80.70        0.6908  0.1915      2      1
## 2     2016 2016-08-27 Chelsea  80.86        0.7139  0.1947      3      0
## 3     2016 2016-09-16 Chelsea  81.72        0.5080  0.2388      1      2
## 4     2016 2016-10-15 Chelsea  80.91        0.6441  0.2192      3      0
## 5     2016 2016-10-23 Chelsea  82.00        0.4996  0.2607      4      0
## 6     2016 2016-11-05 Chelsea  84.17        0.6702  0.2077      5      0
## 7     2016 2016-11-26 Chelsea  86.29        0.6450  0.2228      2      1
## 8     2016 2016-12-11 Chelsea  86.69        0.7776  0.1565      1      0
## 9     2016 2016-12-26 Chelsea  86.26        0.7867  0.1508      3      0
## 10    2016 2016-12-31 Chelsea  86.47        0.7734  0.1674      4      2
## 11    2016 2017-01-22 Chelsea  86.28        0.8436  0.1214      2      0
## 12    2016 2017-02-04 Chelsea  85.58        0.5259  0.2468      3      1
## 13    2016 2017-02-25 Chelsea  85.46        0.7975  0.1450      3      1
## 14    2016 2017-04-01 Chelsea  85.66        0.7807  0.1623      1      2
## 15    2016 2017-04-05 Chelsea  84.62        0.4585  0.2665      2      1
## 16    2016 2017-04-25 Chelsea  84.36        0.6965  0.2039      4      2
## 17    2016 2017-05-08 Chelsea  85.75        0.8170  0.1400      3      0
## 18    2016 2017-05-15 Chelsea  86.71        0.8064  0.1451      4      3
## 19    2016 2017-05-21 Chelsea  85.90        0.8429  0.1200      5      1
## 20    2017 2017-08-12 Chelsea  82.76        0.7184  0.1805      2      3
## 21    2017 2017-08-27 Chelsea  82.05        0.6274  0.2162      2      0
## 22    2017 2017-09-12 Chelsea  82.23        0.9072  0.0790      6      0
## 23    2017 2017-09-17 Chelsea  83.38        0.5506  0.2204      0      0
## 24    2017 2017-09-30 Chelsea  84.68        0.3615  0.2542      0      1
## 25    2017 2017-10-18 Chelsea  82.42        0.5191  0.2426      3      3
## 26    2017 2017-10-21 Chelsea  82.15        0.7637  0.1607      4      2
## 27    2017 2017-11-05 Chelsea  81.07        0.3863  0.2648      1      0
## 28    2017 2017-11-29 Chelsea  84.00        0.8256  0.1351      1      0
## 29    2017 2017-12-02 Chelsea  83.79        0.8207  0.1334      3      1
## 30    2017 2017-12-05 Chelsea  84.04        0.4734  0.2761      1      1
## 31    2017 2017-12-16 Chelsea  83.94        0.7586  0.1671      1      0
## 32    2017 2017-12-26 Chelsea  84.11        0.8335  0.1371      2      0
## 33    2017 2017-12-30 Chelsea  84.32        0.8182  0.1301      5      0
## 34    2017 2018-01-13 Chelsea  85.60        0.7571  0.1651      0      0
## 35    2017 2018-01-31 Chelsea  84.98        0.8084  0.1385      0      3
## 36    2017 2018-02-12 Chelsea  80.44        0.7685  0.1701      3      0
## 37    2017 2018-02-20 Chelsea  80.97        0.2426  0.2369      1      1
## 38    2017 2018-03-10 Chelsea  80.56        0.6792  0.2019      2      1
## 39    2017 2018-04-01 Chelsea  80.79        0.3469  0.2643      1      3
## 40    2017 2018-04-08 Chelsea  80.21        0.7784  0.1484      1      1
## 41    2017 2018-05-06 Chelsea  80.70        0.3484  0.2476      1      0
## 42    2017 2018-05-09 Chelsea  80.98        0.8171  0.1503      1      1
## 43    2018 2018-08-18 Chelsea  85.12        0.5039  0.2362      3      2
## 44    2018 2018-09-01 Chelsea  85.37        0.7545  0.1626      2      0
## 45    2018 2018-09-15 Chelsea  85.31        0.8049  0.1478      4      1
## 46    2018 2018-09-29 Chelsea  86.65        0.3488  0.2606      1      1
## 47    2018 2018-10-04 Chelsea  86.22        0.8721  0.1105      1      0
## 48    2018 2018-10-20 Chelsea  86.66        0.5640  0.2327      2      2
## 49    2018 2018-10-25 Chelsea  86.53        0.8291  0.1340      3      1
## 50    2018 2018-11-04 Chelsea  87.58        0.7550  0.1704      3      1
## 51    2018 2018-11-11 Chelsea  87.28        0.7113  0.1886      0      0
## 52    2018 2018-11-29 Chelsea  85.96        0.5723  0.2561      4      0
## 53    2018 2018-12-02 Chelsea  86.63        0.8333  0.1230      2      0
## 54    2018 2018-12-08 Chelsea  86.18        0.2770  0.2440      2      0
## 55    2018 2018-12-22 Chelsea  86.10        0.7077  0.2006      0      1
## 56    2018 2019-01-02 Chelsea  86.28        0.7235  0.1862      0      0
## 57    2018 2019-01-12 Chelsea  86.18        0.7772  0.1718      2      1
## 58    2018 2019-02-02 Chelsea  83.17        0.8180  0.1547      5      0
## 59    2018 2019-02-21 Chelsea  83.66        0.7702  0.1682      3      0
## 60    2018 2019-02-27 Chelsea  83.83        0.4789  0.2540      2      0
## 61    2018 2019-03-07 Chelsea  83.90        0.5966  0.2367      3      0
## 62    2018 2019-03-10 Chelsea  84.77        0.7087  0.1970      1      1
## 63    2018 2019-04-03 Chelsea  85.26        0.8182  0.1399      3      0
## 64    2018 2019-04-08 Chelsea  85.96        0.8416  0.1187      2      0
## 65    2018 2019-04-18 Chelsea  85.39        0.8194  0.1554      4      3
## 66    2018 2019-04-22 Chelsea  84.85        0.7527  0.1684      2      2
## 67    2018 2019-05-05 Chelsea  84.99        0.7433  0.1705      3      0
## 68    2018 2019-05-09 Chelsea  85.05        0.6167  0.2186      1      1
## 69    2018 2019-05-29 Chelsea  85.06        0.6025  0.0000      4      1
## 70    2019 2019-08-18 Chelsea  84.60        0.6168  0.2238      1      1
## 71    2019 2019-08-31 Chelsea  84.31        0.7425  0.1751      2      2
## 72    2019 2019-09-17 Chelsea  84.04        0.5901  0.2167      0      1
## 73    2019 2019-09-22 Chelsea  84.09        0.3013  0.2339      1      2
## 74    2019 2019-09-28 Chelsea  84.10        0.7050  0.1889      2      0
## 75    2019 2019-10-19 Chelsea  85.47        0.7279  0.1793      1      0
## 76    2019 2019-11-05 Chelsea  85.78        0.5212  0.2115      4      4
## 77    2019 2019-11-09 Chelsea  86.49        0.7170  0.1774      2      0
## 78    2019 2019-11-30 Chelsea  86.72        0.7748  0.1431      0      1
## 79    2019 2019-12-04 Chelsea  86.21        0.7574  0.1546      2      1
## 80    2019 2019-12-10 Chelsea  85.71        0.7853  0.1595      2      1
## 81    2019 2019-12-14 Chelsea  85.86        0.7410  0.1610      0      1
## 82    2019 2019-12-26 Chelsea  86.28        0.7590  0.1540      0      2
## 83    2019 2020-01-11 Chelsea  85.02        0.7051  0.1874      3      0
## 84    2019 2020-01-21 Chelsea  85.66        0.6458  0.2039      2      2
## 85    2019 2020-02-17 Chelsea  85.95        0.5353  0.2373      0      2
## 86    2019 2020-02-22 Chelsea  85.34        0.5411  0.2278      2      1
## 87    2019 2020-02-25 Chelsea  85.57        0.3023  0.2174      0      3
## 88    2019 2020-03-08 Chelsea  84.22        0.5712  0.2295      4      0
## 89    2019 2020-06-25 Chelsea  85.43        0.2474  0.2249      2      1
## 90    2019 2020-07-04 Chelsea  85.69        0.6193  0.2139      3      0
## 91    2019 2020-07-14 Chelsea  84.05        0.8477  0.1139      1      0
## 92    2019 2020-07-26 Chelsea  85.21        0.5658  0.2439      2      0
## 93    2020 2020-09-20 Chelsea  85.04        0.3359  0.2327      0      2
## 94    2020 2020-10-03 Chelsea  83.65        0.6733  0.1995      4      0
## 95    2020 2020-10-17 Chelsea  84.52        0.6372  0.2067      3      3
## 96    2020 2020-10-20 Chelsea  83.67        0.5003  0.2521      0      0
## 97    2020 2020-11-04 Chelsea  85.19        0.6855  0.2066      3      0
## 98    2020 2020-11-07 Chelsea  85.60        0.6861  0.2034      4      1
## 99    2020 2020-11-29 Chelsea  86.44        0.4751  0.2385      0      0
## 100   2020 2020-12-05 Chelsea  87.55        0.7095  0.1795      3      1
## 101   2020 2020-12-08 Chelsea  87.88        0.7807  0.1582      1      1
## 102   2020 2020-12-21 Chelsea  86.96        0.6419  0.2086      3      0
## 103   2020 2020-12-28 Chelsea  86.90        0.5681  0.2254      1      1
## 104   2020 2021-01-03 Chelsea  86.79        0.2705  0.2486      1      3
## 105   2020 2021-01-27 Chelsea  85.67        0.6611  0.2108      0      0
## 106   2020 2021-01-31 Chelsea  85.58        0.6866  0.2097      2      0
## 107   2020 2021-02-15 Chelsea  86.81        0.7600  0.1710      2      0
## 108   2020 2021-02-28 Chelsea  87.82        0.4675  0.2546      0      0
## 109   2020 2021-03-08 Chelsea  88.59        0.6603  0.2218      2      0
## 110   2020 2021-03-17 Chelsea  89.10        0.5152  0.2862      2      0
## 111   2020 2021-04-03 Chelsea  89.35        0.8659  0.1143      2      5
## 112   2020 2021-04-13 Chelsea  88.26        0.6559  0.2249      0      1
## 113   2020 2021-04-20 Chelsea  87.33        0.6417  0.2334      0      0
## 114   2020 2021-05-01 Chelsea  88.42        0.7169  0.2095      2      0
## 115   2020 2021-05-05 Chelsea  88.45        0.4505  0.2783      2      0
## 116   2020 2021-05-12 Chelsea  89.83        0.5819  0.2536      0      1
## 117   2020 2021-05-18 Chelsea  89.91        0.5666  0.2506      2      1
## 118   2021 2021-08-14 Chelsea  88.33        0.7531  0.1700      3      0
## 119   2016 2016-08-20 Chelsea  80.51        0.5783  0.2262      1      2
## 120   2016 2016-09-11 Chelsea  81.83        0.6033  0.2257      2      2
## 121   2016 2016-09-24 Chelsea  81.10        0.2563  0.2453      3      0
## 122   2016 2016-10-01 Chelsea  79.83        0.6221  0.2240      0      2
## 123   2016 2016-10-30 Chelsea  83.43        0.4507  0.2658      0      2
## 124   2016 2016-11-20 Chelsea  85.90        0.6708  0.2090      0      1
## 125   2016 2016-12-03 Chelsea  86.11        0.2601  0.2485      1      3
## 126   2016 2016-12-14 Chelsea  86.30        0.7687  0.1577      0      1
## 127   2016 2016-12-17 Chelsea  86.27        0.7218  0.1745      0      1
## 128   2016 2017-01-04 Chelsea  86.13        0.3830  0.2750      2      0
## 129   2016 2017-01-14 Chelsea  85.52        0.6365  0.2189      0      3
## 130   2016 2017-01-31 Chelsea  85.85        0.3722  0.2640      1      1
## 131   2016 2017-02-12 Chelsea  85.94        0.6546  0.2167      1      1
## 132   2016 2017-03-06 Chelsea  85.42        0.6242  0.2214      1      2
## 133   2016 2017-03-18 Chelsea  85.50        0.5806  0.2491      1      2
## 134   2016 2017-04-08 Chelsea  84.64        0.6389  0.2087      1      3
## 135   2016 2017-04-16 Chelsea  85.17        0.3110  0.2861      2      0
## 136   2016 2017-04-30 Chelsea  84.44        0.4465  0.2618      0      3
## 137   2016 2017-05-12 Chelsea  86.15        0.6679  0.2119      0      1
## 138   2017 2017-08-20 Chelsea  81.51        0.2988  0.2531      1      2
## 139   2017 2017-09-09 Chelsea  82.35        0.5379  0.2339      1      2
## 140   2017 2017-09-23 Chelsea  82.63        0.5397  0.2432      0      4
## 141   2017 2017-09-27 Chelsea  83.60        0.2366  0.2654      1      2
## 142   2017 2017-10-14 Chelsea  83.93        0.6394  0.2108      2      1
## 143   2017 2017-10-28 Chelsea  81.18        0.5907  0.2217      0      1
## 144   2017 2017-10-31 Chelsea  81.66        0.2809  0.2511      3      0
## 145   2017 2017-11-18 Chelsea  81.62        0.5782  0.2412      0      4
## 146   2017 2017-11-22 Chelsea  82.88        0.7027  0.2034      0      4
## 147   2017 2017-11-25 Chelsea  84.01        0.3324  0.2425      1      1
## 148   2017 2017-12-09 Chelsea  84.31        0.6575  0.1971      1      0
## 149   2017 2017-12-12 Chelsea  83.85        0.6868  0.2005      1      3
## 150   2017 2017-12-23 Chelsea  83.82        0.5742  0.2263      0      0
## 151   2017 2018-01-03 Chelsea  85.34        0.3500  0.2487      2      2
## 152   2017 2018-01-20 Chelsea  84.59        0.6575  0.2187      0      4
## 153   2017 2018-02-05 Chelsea  82.80        0.5899  0.2229      4      1
## 154   2017 2018-02-25 Chelsea  81.04        0.3180  0.2682      2      1
## 155   2017 2018-03-04 Chelsea  80.94        0.1551  0.2056      1      0
## 156   2017 2018-03-14 Chelsea  80.84        0.0665  0.1559      3      0
## 157   2017 2018-04-14 Chelsea  80.00        0.5434  0.2402      2      3
## 158   2017 2018-04-19 Chelsea  79.75        0.4661  0.2712      1      2
## 159   2017 2018-04-28 Chelsea  80.41        0.6050  0.2295      0      1
## 160   2017 2018-05-13 Chelsea  80.83        0.5251  0.2560      3      0
## 161   2018 2018-08-11 Chelsea  84.39        0.5945  0.2411      0      3
## 162   2018 2018-08-26 Chelsea  84.78        0.5349  0.2499      1      2
## 163   2018 2018-09-20 Chelsea  85.21        0.3968  0.2726      0      1
## 164   2018 2018-09-23 Chelsea  86.27        0.5973  0.2226      0      0
## 165   2018 2018-10-07 Chelsea  85.84        0.5615  0.2413      0      3
## 166   2018 2018-10-28 Chelsea  86.53        0.6467  0.2067      0      4
## 167   2018 2018-11-08 Chelsea  87.65        0.6709  0.2076      0      1
## 168   2018 2018-11-24 Chelsea  87.15        0.3155  0.2653      3      1
## 169   2018 2018-12-05 Chelsea  86.58        0.5723  0.2449      2      1
## 170   2018 2018-12-13 Chelsea  86.58        0.6647  0.2290      2      2
## 171   2018 2018-12-16 Chelsea  85.92        0.6248  0.2231      1      2
## 172   2018 2018-12-26 Chelsea  85.64        0.5169  0.2513      1      2
## 173   2018 2018-12-30 Chelsea  85.60        0.5191  0.2620      0      1
## 174   2018 2019-01-19 Chelsea  85.52        0.3752  0.2651      2      0
## 175   2018 2019-01-30 Chelsea  84.86        0.5790  0.2332      4      0
## 176   2018 2019-02-10 Chelsea  84.42        0.1484  0.2099      6      0
## 177   2018 2019-02-14 Chelsea  83.31        0.5989  0.2395      1      2
## 178   2018 2019-03-03 Chelsea  84.02        0.6604  0.2042      1      2
## 179   2018 2019-03-14 Chelsea  84.73        0.4395  0.2699      0      5
## 180   2018 2019-03-17 Chelsea  86.31        0.5926  0.2356      2      0
## 181   2018 2019-03-31 Chelsea  85.31        0.6448  0.2122      1      2
## 182   2018 2019-04-11 Chelsea  85.96        0.7006  0.2193      0      1
## 183   2018 2019-04-14 Chelsea  85.61        0.1767  0.2337      2      0
## 184   2018 2019-04-28 Chelsea  84.53        0.4014  0.2565      1      1
## 185   2018 2019-05-02 Chelsea  84.67        0.4028  0.2607      1      1
## 186   2018 2019-05-12 Chelsea  84.48        0.3888  0.2709      0      0
## 187   2019 2019-08-11 Chelsea  85.88        0.3843  0.2494      4      0
## 188   2019 2019-08-24 Chelsea  84.09        0.5547  0.2357      2      3
## 189   2019 2019-09-14 Chelsea  83.50        0.4609  0.2534      2      5
## 190   2019 2019-10-02 Chelsea  84.72        0.4674  0.2603      1      2
## 191   2019 2019-10-06 Chelsea  84.99        0.5263  0.2326      1      4
## 192   2019 2019-10-23 Chelsea  85.86        0.3323  0.2208      0      1
## 193   2019 2019-10-26 Chelsea  86.37        0.5436  0.2350      2      4
## 194   2019 2019-11-02 Chelsea  85.82        0.5584  0.2234      1      2
## 195   2019 2019-11-23 Chelsea  87.16        0.1476  0.1768      2      1
## 196   2019 2019-11-27 Chelsea  87.39        0.4838  0.2315      2      2
## 197   2019 2019-12-07 Chelsea  86.08        0.4675  0.2433      3      1
## 198   2019 2019-12-22 Chelsea  85.22        0.3431  0.2283      0      2
## 199   2019 2019-12-29 Chelsea  85.40        0.4825  0.2354      1      2
## 200   2019 2020-01-01 Chelsea  85.74        0.5452  0.2334      1      1
## 201   2019 2020-01-18 Chelsea  85.76        0.6235  0.2132      1      0
## 202   2019 2020-02-01 Chelsea  86.07        0.4018  0.2471      2      2
## 203   2019 2020-02-29 Chelsea  84.59        0.5733  0.2220      2      2
## 204   2019 2020-06-21 Chelsea  85.54        0.6192  0.2030      1      2
## 205   2019 2020-07-01 Chelsea  86.92        0.6212  0.2063      3      2
## 206   2019 2020-07-07 Chelsea  86.23        0.6120  0.2258      2      3
## 207   2019 2020-07-11 Chelsea  85.60        0.5424  0.2448      3      0
## 208   2019 2020-07-22 Chelsea  84.95        0.2687  0.2277      5      3
## 209   2019 2020-08-08 Chelsea  86.00        0.1934  0.1930      4      1
## 210   2020 2020-09-14 Chelsea  85.37        0.5806  0.2249      1      3
## 211   2020 2020-09-26 Chelsea  84.16        0.6443  0.2029      3      3
## 212   2020 2020-10-24 Chelsea  83.55        0.3411  0.2358      0      0
## 213   2020 2020-10-28 Chelsea  83.58        0.5571  0.2392      0      4
## 214   2020 2020-10-31 Chelsea  84.29        0.5405  0.2435      0      3
## 215   2020 2020-11-21 Chelsea  86.07        0.6164  0.2181      0      2
## 216   2020 2020-11-24 Chelsea  86.68        0.5440  0.2515      1      2
## 217   2020 2020-12-02 Chelsea  86.62        0.3679  0.2737      0      4
## 218   2020 2020-12-12 Chelsea  87.43        0.5562  0.2247      1      0
## 219   2020 2020-12-15 Chelsea  87.22        0.5231  0.2596      2      1
## 220   2020 2020-12-26 Chelsea  87.34        0.4888  0.2519      3      1
## 221   2020 2021-01-16 Chelsea  85.78        0.5808  0.2298      0      1
## 222   2020 2021-01-19 Chelsea  86.31        0.4092  0.2588      2      0
## 223   2020 2021-02-04 Chelsea  85.98        0.4158  0.2576      0      1
## 224   2020 2021-02-07 Chelsea  86.95        0.6218  0.2329      1      2
## 225   2020 2021-02-20 Chelsea  87.02        0.6008  0.2310      1      1
## 226   2020 2021-02-23 Chelsea  87.23        0.3218  0.2887      0      1
## 227   2020 2021-03-04 Chelsea  88.07        0.2892  0.2619      0      1
## 228   2020 2021-03-13 Chelsea  89.17        0.6123  0.2223      0      0
## 229   2020 2021-04-07 Chelsea  87.54        0.5295  0.2617      0      2
## 230   2020 2021-04-10 Chelsea  87.43        0.6980  0.2006      1      4
## 231   2020 2021-04-24 Chelsea  87.10        0.4506  0.2588      0      1
## 232   2020 2021-04-27 Chelsea  88.08        0.2804  0.2780      1      1
## 233   2020 2021-05-08 Chelsea  89.41        0.2544  0.2751      1      2
## 234   2020 2021-05-23 Chelsea  89.92        0.6261  0.2238      2      1
## 235   2020 2021-05-29 Chelsea  90.00        0.4216  0.0000      0      1
## 236   2021 2021-08-22 Chelsea  88.51        0.4484  0.2677      0      2
## 237   2021 2021-08-28 Chelsea  89.61        0.3237  0.2565     NA     NA
##     win_loss
## 1        win
## 2        win
## 3       loss
## 4        win
## 5        win
## 6        win
## 7        win
## 8        win
## 9        win
## 10       win
## 11       win
## 12       win
## 13       win
## 14      loss
## 15       win
## 16       win
## 17       win
## 18       win
## 19       win
## 20      loss
## 21       win
## 22       win
## 23       tie
## 24      loss
## 25       tie
## 26       win
## 27       win
## 28       win
## 29       win
## 30       tie
## 31       win
## 32       win
## 33       win
## 34       tie
## 35      loss
## 36       win
## 37       tie
## 38       win
## 39      loss
## 40       tie
## 41       win
## 42       tie
## 43       win
## 44       win
## 45       win
## 46       tie
## 47       win
## 48       tie
## 49       win
## 50       win
## 51       tie
## 52       win
## 53       win
## 54       win
## 55      loss
## 56       tie
## 57       win
## 58       win
## 59       win
## 60       win
## 61       win
## 62       tie
## 63       win
## 64       win
## 65       win
## 66       tie
## 67       win
## 68       tie
## 69       win
## 70       tie
## 71       tie
## 72      loss
## 73      loss
## 74       win
## 75       win
## 76       tie
## 77       win
## 78      loss
## 79       win
## 80       win
## 81      loss
## 82      loss
## 83       win
## 84       tie
## 85      loss
## 86       win
## 87      loss
## 88       win
## 89       win
## 90       win
## 91       win
## 92       win
## 93      loss
## 94       win
## 95       tie
## 96       tie
## 97       win
## 98       win
## 99       tie
## 100      win
## 101      tie
## 102      win
## 103      tie
## 104     loss
## 105      tie
## 106      win
## 107      win
## 108      tie
## 109      win
## 110      win
## 111     loss
## 112     loss
## 113      tie
## 114      win
## 115      win
## 116     loss
## 117      win
## 118      win
## 119      win
## 120      tie
## 121     loss
## 122      win
## 123      win
## 124      win
## 125      win
## 126      win
## 127      win
## 128     loss
## 129      win
## 130      tie
## 131      tie
## 132      win
## 133      win
## 134      win
## 135     loss
## 136      win
## 137      win
## 138      win
## 139      win
## 140      win
## 141      win
## 142     loss
## 143      win
## 144     loss
## 145      win
## 146      win
## 147      tie
## 148     loss
## 149      win
## 150      tie
## 151      tie
## 152      win
## 153     loss
## 154     loss
## 155     loss
## 156     loss
## 157      win
## 158      win
## 159      win
## 160     loss
## 161      win
## 162      win
## 163      win
## 164      tie
## 165      win
## 166      win
## 167      win
## 168     loss
## 169     loss
## 170      tie
## 171      win
## 172      win
## 173      win
## 174     loss
## 175     loss
## 176     loss
## 177      win
## 178      win
## 179      win
## 180     loss
## 181      win
## 182      win
## 183     loss
## 184      tie
## 185      tie
## 186      tie
## 187     loss
## 188      win
## 189      win
## 190      win
## 191      win
## 192      win
## 193      win
## 194      win
## 195     loss
## 196      tie
## 197     loss
## 198      win
## 199      win
## 200      tie
## 201     loss
## 202      tie
## 203      tie
## 204      win
## 205     loss
## 206      win
## 207     loss
## 208     loss
## 209     loss
## 210      win
## 211      tie
## 212      tie
## 213      win
## 214      win
## 215      win
## 216      win
## 217      win
## 218     loss
## 219     loss
## 220     loss
## 221      win
## 222     loss
## 223      win
## 224      win
## 225      tie
## 226      win
## 227      win
## 228      tie
## 229      win
## 230      win
## 231      win
## 232      tie
## 233      win
## 234     loss
## 235      win
## 236      win
## 237     <NA>