Skip to contents

Load .qs file from a remote connection

Usage

qs_from_url(url)

Arguments

url

a character url

Value

a dataframe as parsed by qs::qdeserialize()

Examples

.for_cran()
# \donttest{
try({
  qs_from_url(
    "https://github.com/nflverse/nflverse-data/releases/download/player_stats/player_stats.qs"
  )
})
#>          player_id  player_name   player_display_name position position_group
#>      1: 00-0000003         <NA> Abdul-Karim al-Jabbar       RB             RB
#>      2: 00-0000003         <NA> Abdul-Karim al-Jabbar       RB             RB
#>      3: 00-0000003         <NA> Abdul-Karim al-Jabbar       RB             RB
#>      4: 00-0000003         <NA> Abdul-Karim al-Jabbar       RB             RB
#>      5: 00-0000003         <NA> Abdul-Karim al-Jabbar       RB             RB
#>     ---                                                                      
#> 124985: 00-0039164 A.Richardson    Anthony Richardson       QB             QB
#> 124986: 00-0039164 A.Richardson    Anthony Richardson       QB             QB
#> 124987: 00-0039165 Z.Charbonnet       Zach Charbonnet       RB             RB
#> 124988: 00-0039165 Z.Charbonnet       Zach Charbonnet       RB             RB
#> 124989: 00-0039165 Z.Charbonnet       Zach Charbonnet       RB             RB
#>                                                                               headshot_url
#>      1:                                                                               <NA>
#>      2:                                                                               <NA>
#>      3:                                                                               <NA>
#>      4:                                                                               <NA>
#>      5:                                                                               <NA>
#>     ---                                                                                   
#> 124985: https://static.www.nfl.com/image/private/f_auto,q_auto/league/bqrc00wmzjbz1asoapvk
#> 124986: https://static.www.nfl.com/image/private/f_auto,q_auto/league/bqrc00wmzjbz1asoapvk
#> 124987: https://static.www.nfl.com/image/private/f_auto,q_auto/league/yuddw2o5skwkgvut6wrv
#> 124988: https://static.www.nfl.com/image/private/f_auto,q_auto/league/yuddw2o5skwkgvut6wrv
#> 124989: https://static.www.nfl.com/image/private/f_auto,q_auto/league/yuddw2o5skwkgvut6wrv
#>         recent_team season week season_type completions attempts passing_yards
#>      1:         MIA   1999    1         REG           0        0             0
#>      2:         MIA   1999    2         REG           0        0             0
#>      3:         MIA   1999    4         REG           0        0             0
#>      4:         CLE   1999    7         REG           0        0             0
#>      5:         CLE   1999    8         REG           0        0             0
#>     ---                                                                       
#> 124985:         IND   2023    1         REG          24       37           223
#> 124986:         IND   2023    2         REG           6       10            56
#> 124987:         SEA   2023    1         REG           0        0             0
#> 124988:         SEA   2023    2         REG           0        0             0
#> 124989:         SEA   2023    3         REG           0        0             0
#>         passing_tds interceptions sacks sack_yards sack_fumbles
#>      1:           0             0     0          0            0
#>      2:           0             0     0          0            0
#>      3:           0             0     0          0            0
#>      4:           0             0     0          0            0
#>      5:           0             0     0          0            0
#>     ---                                                        
#> 124985:           1             1     4          8            0
#> 124986:           0             0     0          0            0
#> 124987:           0             0     0          0            0
#> 124988:           0             0     0          0            0
#> 124989:           0             0     0          0            0
#>         sack_fumbles_lost passing_air_yards passing_yards_after_catch
#>      1:                 0                 0                         0
#>      2:                 0                 0                         0
#>      3:                 0                 0                         0
#>      4:                 0                 0                         0
#>      5:                 0                 0                         0
#>     ---                                                              
#> 124985:                 0               216                       136
#> 124986:                 0                16                        61
#> 124987:                 0                 0                         0
#> 124988:                 0                 0                         0
#> 124989:                 0                 0                         0
#>         passing_first_downs passing_epa passing_2pt_conversions     pacr
#>      1:                   0          NA                       0       NA
#>      2:                   0          NA                       0       NA
#>      3:                   0          NA                       0       NA
#>      4:                   0          NA                       0       NA
#>      5:                   0          NA                       0       NA
#>     ---                                                                 
#> 124985:                  12   -4.387141                       0 1.032407
#> 124986:                   4    1.732920                       0 3.500000
#> 124987:                   0          NA                       0       NA
#> 124988:                   0          NA                       0       NA
#> 124989:                   0          NA                       0       NA
#>              dakota carries rushing_yards rushing_tds rushing_fumbles
#>      1:          NA      16            60           1               0
#>      2:          NA       9            33           0               0
#>      3:          NA       3             2           0               0
#>      4:          NA       6            27           0               0
#>      5:          NA      13            39           0               0
#>     ---                                                              
#> 124985: -0.01268922      10            40           1               0
#> 124986:  0.09188391       3            35           2               0
#> 124987:          NA       3            11           0               0
#> 124988:          NA       4            16           0               0
#> 124989:          NA       9            46           0               0
#>         rushing_fumbles_lost rushing_first_downs rushing_epa
#>      1:                    0                   4   6.2487711
#>      2:                    0                   1  -1.4349502
#>      3:                    0                   0  -1.5399517
#>      4:                    0                   0   0.2160509
#>      5:                    0                   2  -2.9722589
#>     ---                                                     
#> 124985:                    0                   3  -0.2414975
#> 124986:                    0                   2   3.5136273
#> 124987:                    0                   0  -1.0130621
#> 124988:                    0                   2   0.8344912
#> 124989:                    0                   5   2.7355235
#>         rushing_2pt_conversions receptions targets receiving_yards
#>      1:                       0          1       1               7
#>      2:                       0          3       4              18
#>      3:                       0          0       1               0
#>      4:                       0          2       2               8
#>      5:                       0          0       0               0
#>     ---                                                           
#> 124985:                       0          0       0               0
#> 124986:                       0          0       0               0
#> 124987:                       0          0       0               0
#> 124988:                       0          2       2              14
#> 124989:                       0          1       2              -1
#>         receiving_tds receiving_fumbles receiving_fumbles_lost
#>      1:             0                 0                      0
#>      2:             0                 0                      0
#>      3:             0                 0                      0
#>      4:             0                 0                      0
#>      5:             0                 0                      0
#>     ---                                                       
#> 124985:             0                 0                      0
#> 124986:             0                 0                      0
#> 124987:             0                 0                      0
#> 124988:             0                 0                      0
#> 124989:             0                 0                      0
#>         receiving_air_yards receiving_yards_after_catch receiving_first_downs
#>      1:                   0                           0                     0
#>      2:                   0                           0                     1
#>      3:                   0                           0                     0
#>      4:                   0                           0                     0
#>      5:                   0                           0                     0
#>     ---                                                                      
#> 124985:                   0                           0                     0
#> 124986:                   0                           0                     0
#> 124987:                   0                           0                     0
#> 124988:                   3                          11                     0
#> 124989:                  -5                           7                     0
#>         receiving_epa receiving_2pt_conversions     racr target_share
#>      1:     0.2923782                         0 0.000000   0.05263158
#>      2:     0.3770089                         0 0.000000   0.11764706
#>      3:    -0.6995777                         0 0.000000   0.02380952
#>      4:    -0.2284540                         0 0.000000   0.05000000
#>      5:            NA                         0       NA           NA
#>     ---                                                              
#> 124985:            NA                         0       NA           NA
#> 124986:            NA                         0       NA           NA
#> 124987:            NA                         0       NA           NA
#> 124988:     0.6087014                         0 4.666667   0.05405405
#> 124989:    -1.9041700                         0 0.200000   0.05714286
#>         air_yards_share       wopr special_teams_tds fantasy_points
#>      1:      0.00000000 0.00000000                 0          12.70
#>      2:      0.00000000 0.00000000                 0           5.10
#>      3:      0.00000000 0.00000000                 0           0.20
#>      4:      0.00000000 0.00000000                 0           3.50
#>      5:              NA         NA                 0           3.90
#>     ---                                                            
#> 124985:              NA         NA                 0          20.92
#> 124986:              NA         NA                 0          17.74
#> 124987:              NA         NA                 0           1.10
#> 124988:      0.01345291 0.09049812                 0           3.00
#> 124989:     -0.01650165 0.07416313                 0           4.50
#>         fantasy_points_ppr opponent_team
#>      1:              13.70          <NA>
#>      2:               8.10          <NA>
#>      3:               0.20          <NA>
#>      4:               5.50          <NA>
#>      5:               3.90          <NA>
#>     ---                                 
#> 124985:              20.92           JAX
#> 124986:              17.74           HOU
#> 124987:               1.10            LA
#> 124988:               5.00           DET
#> 124989:               5.50           CAR
# }