Skip to contents

Given a sportID, list all possible matchIDs as well as the corresponding event

Usage

load_olympic_matchID_key(sportID)

Source

NBC API

Arguments

sportID

Sport ID

Value

A data.frame

Author

Billy Fryer

Examples

# \donttest{
try(load_olympic_matchID_key(sportID = 113))
#>    n_SportID n_SportTypeID c_Sport c_SportShort n_Season  c_Season c_Edition
#> 1:       113             1  Hockey          IHO 20212022 2021/2022      2022
#> 2:       113             1  Hockey          IHO 20212022 2021/2022      2022
#>    n_EventMatchID n_ActiveNavigationMatchID n_EventID n_EventTypeID c_Event
#> 1:         220270                 113024002         0             4    Team
#> 2:         220271                 113024001         0             4    Team
#>    c_EventShort n_EventSort n_GenderID c_Gender c_GenderShort n_GenderEventID
#> 1:         Team       10000          1      Men             M            9592
#> 2:         Team       10000          2    Women             W            9608
#>         c_GenderEvent c_GenderEventShort           d_DateStartLocal
#> 1:   Men's Tournament   Men's Tournament /Date(1644424800000+0000)/
#> 2: Women's Tournament Women's Tournament /Date(1643890200000+0000)/
#>       c_DateStartLocal             d_DateStartUTC      c_DateStartUTC
#> 1: 2022-02-09 16:40:00 /Date(1644396000000+0000)/ 2022-02-09 08:40:00
#> 2: 2022-02-03 12:10:00 /Date(1643861400000+0000)/ 2022-02-03 04:10:00
#>                d_DateEndLocal      c_DateEndLocal               d_DateEndUTC
#> 1: /Date(1645367100000+0000)/ 2022-02-20 14:25:00 /Date(1645338300000+0000)/
#> 2: /Date(1645107900000+0000)/ 2022-02-17 14:25:00 /Date(1645079100000+0000)/
#>           c_DateEndUTC n_VenueGeoID c_Venue n_LocationGeoID c_Location
#> 1: 2022-02-20 06:25:00            0      NA            3647    Beijing
#> 2: 2022-02-17 06:25:00            0      NA            3647    Beijing
#>    n_CountryGeoID c_Country c_CountryShort b_StartList b_Started b_Finished
#> 1:           2770     China            CHN       FALSE      TRUE       TRUE
#> 2:           2770     China            CHN       FALSE      TRUE       TRUE
#>    b_HasTableMatchs n_Rank1ParticipantTypeID c_Rank1Participant
#> 1:             TRUE                        4            Finland
#> 2:             TRUE                        4             Canada
#>    c_Rank1ParticipantShort n_Rank1PersonID n_Rank1TeamID n_Rank1NOCID
#> 1:                     FIN              NA           556          161
#> 2:                     CAN              NA           140          159
#>    n_Rank1NOCGeoID c_Rank1NOCGeoID c_Rank1NOC c_Rank1NOCShort
#> 1:            2237            2237    Finland             FIN
#> 2:            2231            2231     Canada             CAN
#>    n_Rank1TeamMember1PersonID c_Rank1TeamMember1Person
#> 1:                         NA                       NA
#> 2:                         NA                       NA
#>    c_Rank1TeamMember1PersonShort n_Rank1TeamMember2PersonID
#> 1:                            NA                         NA
#> 2:                            NA                         NA
#>    c_Rank1TeamMember2Person c_Rank1TeamMember2PersonShort
#> 1:                       NA                            NA
#> 2:                       NA                            NA
#>    n_Rank2ParticipantTypeID c_Rank2Participant c_Rank2ParticipantShort
#> 1:                        4                ROC                     ROC
#> 2:                        4      United States                     USA
#>    n_Rank2PersonID n_Rank2TeamID n_Rank2NOCID n_Rank2NOCGeoID c_Rank2NOCGeoID
#> 1:              NA         64005        23062           73035           73035
#> 2:              NA           274            5            2209            2209
#>       c_Rank2NOC c_Rank2NOCShort n_Rank2TeamMember1PersonID
#> 1:           ROC             ROC                         NA
#> 2: United States             USA                         NA
#>    c_Rank2TeamMember1Person c_Rank2TeamMember1PersonShort
#> 1:                       NA                            NA
#> 2:                       NA                            NA
#>    n_Rank2TeamMember2PersonID c_Rank2TeamMember2Person
#> 1:                         NA                       NA
#> 2:                         NA                       NA
#>    c_Rank2TeamMember2PersonShort n_Rank3ParticipantTypeID c_Rank3Participant
#> 1:                            NA                        4           Slovakia
#> 2:                            NA                        4            Finland
#>    c_Rank3ParticipantShort n_Rank3PersonID n_Rank3TeamID n_Rank3NOCID
#> 1:                     SVK              NA           696           14
#> 2:                     FIN              NA           589          161
#>    n_Rank3NOCGeoID c_Rank3NOCGeoID c_Rank3NOC c_Rank3NOCShort
#> 1:            2233            2233   Slovakia             SVK
#> 2:            2237            2237    Finland             FIN
#>    n_Rank3TeamMember1PersonID c_Rank3TeamMember1Person
#> 1:                         NA                       NA
#> 2:                         NA                       NA
#>    c_Rank3TeamMember1PersonShort n_Rank3TeamMember2PersonID
#> 1:                            NA                         NA
#> 2:                            NA                         NA
#>    c_Rank3TeamMember2Person c_Rank3TeamMember2PersonShort
#> 1:                       NA                            NA
#> 2:                       NA                            NA
#>                             c_RSCCode
#> 1: IHOMTEAM6-------------SFNL000600--
#> 2: IHOWTEAM6-------------SFNL001000--
# }