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

# \donttest{
try({
  qs_from_url(
    "https://github.com/nflverse/nflverse-data/releases/download/player_stats/player_stats.qs"
  )
})
#>          player_id player_name recent_team season week season_type completions
#>      1: 00-0000003 A.al-Jabbar         MIA   1999    1         REG           0
#>      2: 00-0000003 A.al-Jabbar         MIA   1999    2         REG           0
#>      3: 00-0000003 A.al-Jabbar         MIA   1999    4         REG           0
#>      4: 00-0000003 A.al-Jabbar         CLE   1999    7         REG           0
#>      5: 00-0000003 A.al-Jabbar         CLE   1999    8         REG           0
#>     ---                                                                       
#> 118446: 00-0037013    Z.Wilson         NYJ   2021   14         REG          19
#> 118447: 00-0037013    Z.Wilson         NYJ   2021   15         REG          13
#> 118448: 00-0037013    Z.Wilson         NYJ   2021   16         REG          14
#> 118449: 00-0037013    Z.Wilson         NYJ   2021   17         REG          19
#> 118450: 00-0037013    Z.Wilson         NYJ   2021   18         REG           7
#>         attempts passing_yards passing_tds interceptions sacks sack_yards
#>      1:        0             0           0             0     0          0
#>      2:        0             0           0             0     0          0
#>      3:        0             0           0             0     0          0
#>      4:        0             0           0             0     0          0
#>      5:        0             0           0             0     0          0
#>     ---                                                                  
#> 118446:       42           202           0             0     3         24
#> 118447:       23           170           0             0     6         44
#> 118448:       22           102           1             0     1          2
#> 118449:       33           234           1             0     1         10
#> 118450:       20            87           1             0     8         79
#>         sack_fumbles sack_fumbles_lost passing_air_yards
#>      1:            0                 0                 0
#>      2:            0                 0                 0
#>      3:            0                 0                 0
#>      4:            0                 0                 0
#>      5:            0                 0                 0
#>     ---                                                 
#> 118446:            0                 0               305
#> 118447:            1                 1               127
#> 118448:            0                 0               101
#> 118449:            0                 0               242
#> 118450:            1                 0               136
#>         passing_yards_after_catch passing_first_downs passing_epa
#>      1:                         0                   0          NA
#>      2:                         0                   0          NA
#>      3:                         0                   0          NA
#>      4:                         0                   0          NA
#>      5:                         0                   0          NA
#>     ---                                                          
#> 118446:                       109                   9 -15.4053883
#> 118447:                       126                   8 -11.6399882
#> 118448:                        51                   7  -0.7609113
#> 118449:                       148                  14   8.4023567
#> 118450:                        33                   3 -16.8727470
#>         passing_2pt_conversions      pacr      dakota carries rushing_yards
#>      1:                       0        NA          NA      16            60
#>      2:                       0        NA          NA       9            33
#>      3:                       0        NA          NA       3             2
#>      4:                       0        NA          NA       6            27
#>      5:                       0        NA          NA      13            39
#>     ---                                                                    
#> 118446:                       0 0.6622951 -0.08531825       4            33
#> 118447:                       0 1.3385827 -0.04335738       4            12
#> 118448:                       0 1.0099010  0.14345570       4            91
#> 118449:                       0 0.9669421  0.07995759       2             0
#> 118450:                       0 0.6397059 -0.12917477       2            24
#>         rushing_tds rushing_fumbles rushing_fumbles_lost rushing_first_downs
#>      1:           1               0                    0                   4
#>      2:           0               0                    0                   1
#>      3:           0               0                    0                   0
#>      4:           0               0                    0                   0
#>      5:           0               0                    0                   2
#>     ---                                                                     
#> 118446:           0               0                    0                   1
#> 118447:           1               0                    0                   2
#> 118448:           1               0                    0                   3
#> 118449:           0               0                    0                   0
#> 118450:           0               0                    0                   0
#>         rushing_epa rushing_2pt_conversions receptions targets receiving_yards
#>      1:   6.2487711                       0          1       1               7
#>      2:  -1.4349502                       0          3       4              18
#>      3:  -1.5399517                       0          0       1               0
#>      4:   0.2160509                       0          2       2               8
#>      5:  -2.9722589                       0          0       0               0
#>     ---                                                                       
#> 118446:  -2.5408663                       0          0       0               0
#> 118447:   1.2215496                       0          0       1               0
#> 118448:   9.1837906                       0          0       0               0
#> 118449:  -3.4315242                       0          0       0               0
#> 118450:   0.6019657                       0          0       0               0
#>         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
#>     ---                                                       
#> 118446:             0                 0                      0
#> 118447:             0                 0                      0
#> 118448:             0                 0                      0
#> 118449:             0                 0                      0
#> 118450:             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
#>     ---                                                                      
#> 118446:                   0                           0                     0
#> 118447:                   8                           0                     0
#> 118448:                   0                           0                     0
#> 118449:                   0                           0                     0
#> 118450:                   0                           0                     0
#>         receiving_epa receiving_2pt_conversions racr target_share
#>      1:     0.2923782                         0    0   0.05263158
#>      2:     0.3770089                         0    0   0.11764706
#>      3:    -0.6995777                         0    0   0.02380952
#>      4:    -0.2284540                         0    0   0.05000000
#>      5:            NA                         0   NA           NA
#>     ---                                                          
#> 118446:            NA                         0   NA           NA
#> 118447:    -0.7408588                         0    0   0.04545455
#> 118448:            NA                         0   NA           NA
#> 118449:            NA                         0   NA           NA
#> 118450:            NA                         0   NA           NA
#>         air_yards_share      wopr special_teams_tds fantasy_points
#>      1:      0.00000000 0.0000000                 0          12.70
#>      2:      0.00000000 0.0000000                 0           5.10
#>      3:      0.00000000 0.0000000                 0           0.20
#>      4:      0.00000000 0.0000000                 0           3.50
#>      5:              NA        NA                 0           3.90
#>     ---                                                           
#> 118446:              NA        NA                 0          11.38
#> 118447:      0.07207207 0.1186323                 0          12.00
#> 118448:              NA        NA                 0          23.18
#> 118449:              NA        NA                 0          13.36
#> 118450:              NA        NA                 0           9.88
#>         fantasy_points_ppr
#>      1:              13.70
#>      2:               8.10
#>      3:               0.20
#>      4:               5.50
#>      5:               3.90
#>     ---                   
#> 118446:              11.38
#> 118447:              12.00
#> 118448:              23.18
#> 118449:              13.36
#> 118450:               9.88
# }