Skip to contents

Retrieves a parquet file from URL. This function is cached

Usage

parquet_from_url(url)

Arguments

url

a character url

Value

a dataframe as parsed by arrow::read_parquet()

Examples

# \donttest{
try({
  parquet_from_url(
    "https://github.com/nflverse/nflverse-data/releases/download/player_stats/player_stats.parquet"
  )
})
#>          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
#>     ---                                                                     
#> 121141: 00-0038134    K.Walker        Kenneth Walker       RB             RB
#> 121142: 00-0038134    K.Walker        Kenneth Walker       RB             RB
#> 121143: 00-0038134    K.Walker        Kenneth Walker       RB             RB
#> 121144: 00-0038134    K.Walker        Kenneth Walker       RB             RB
#> 121145: 00-0038134    K.Walker        Kenneth Walker       RB             RB
#>                                                                               headshot_url
#>      1:                                                                               <NA>
#>      2:                                                                               <NA>
#>      3:                                                                               <NA>
#>      4:                                                                               <NA>
#>      5:                                                                               <NA>
#>     ---                                                                                   
#> 121141: https://static.www.nfl.com/image/private/f_auto,q_auto/league/rwdj1bljth8fyojof5dp
#> 121142: https://static.www.nfl.com/image/private/f_auto,q_auto/league/rwdj1bljth8fyojof5dp
#> 121143: https://static.www.nfl.com/image/private/f_auto,q_auto/league/rwdj1bljth8fyojof5dp
#> 121144: https://static.www.nfl.com/image/private/f_auto,q_auto/league/rwdj1bljth8fyojof5dp
#> 121145: https://static.www.nfl.com/image/private/f_auto,q_auto/league/rwdj1bljth8fyojof5dp
#>         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
#>     ---                                                                       
#> 121141:         SEA   2022    5         REG           0        0             0
#> 121142:         SEA   2022    6         REG           0        0             0
#> 121143:         SEA   2022    7         REG           0        0             0
#> 121144:         SEA   2022    8         REG           0        0             0
#> 121145:         SEA   2022    9         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
#>     ---                                                        
#> 121141:           0             0     0          0            0
#> 121142:           0             0     0          0            0
#> 121143:           0             0     0          0            0
#> 121144:           0             0     0          0            0
#> 121145:           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
#>     ---                                                              
#> 121141:                 0                 0                         0
#> 121142:                 0                 0                         0
#> 121143:                 0                 0                         0
#> 121144:                 0                 0                         0
#> 121145:                 0                 0                         0
#>         passing_first_downs passing_epa passing_2pt_conversions pacr dakota
#>      1:                   0          NA                       0   NA     NA
#>      2:                   0          NA                       0   NA     NA
#>      3:                   0          NA                       0   NA     NA
#>      4:                   0          NA                       0   NA     NA
#>      5:                   0          NA                       0   NA     NA
#>     ---                                                                    
#> 121141:                   0          NA                       0   NA     NA
#> 121142:                   0          NA                       0   NA     NA
#> 121143:                   0          NA                       0   NA     NA
#> 121144:                   0          NA                       0   NA     NA
#> 121145:                   0          NA                       0   NA     NA
#>         carries rushing_yards rushing_tds rushing_fumbles rushing_fumbles_lost
#>      1:      16            60           1               0                    0
#>      2:       9            33           0               0                    0
#>      3:       3             2           0               0                    0
#>      4:       6            27           0               0                    0
#>      5:      13            39           0               0                    0
#>     ---                                                                       
#> 121141:       8            88           1               0                    0
#> 121142:      21            97           1               0                    0
#> 121143:      23           167           2               0                    0
#> 121144:      18            51           1               0                    0
#> 121145:      26           109           2               0                    0
#>         rushing_first_downs rushing_epa rushing_2pt_conversions receptions
#>      1:                   4   6.2487711                       0          1
#>      2:                   1  -1.4349502                       0          3
#>      3:                   0  -1.5399517                       0          0
#>      4:                   0   0.2160509                       0          2
#>      5:                   2  -2.9722589                       0          0
#>     ---                                                                   
#> 121141:                   1   2.2373048                       0          0
#> 121142:                   5  -3.2465346                       0          2
#> 121143:                   7   5.5801704                       0          0
#> 121144:                   3  -2.6242232                       0          1
#> 121145:                   7   3.3986380                       0          3
#>         targets receiving_yards receiving_tds receiving_fumbles
#>      1:       1               7             0                 0
#>      2:       4              18             0                 0
#>      3:       1               0             0                 0
#>      4:       2               8             0                 0
#>      5:       0               0             0                 0
#>     ---                                                        
#> 121141:       0               0             0                 0
#> 121142:       3              13             0                 0
#> 121143:       0               0             0                 0
#> 121144:       2               1             0                 0
#> 121145:       4              20             0                 0
#>         receiving_fumbles_lost receiving_air_yards receiving_yards_after_catch
#>      1:                      0                   0                           0
#>      2:                      0                   0                           0
#>      3:                      0                   0                           0
#>      4:                      0                   0                           0
#>      5:                      0                   0                           0
#>     ---                                                                       
#> 121141:                      0                   0                           0
#> 121142:                      0                  -9                          15
#> 121143:                      0                   0                           0
#> 121144:                      0                   6                           0
#> 121145:                      0                 -19                          29
#>         receiving_first_downs receiving_epa receiving_2pt_conversions
#>      1:                     0     0.2923782                         0
#>      2:                     1     0.3770089                         0
#>      3:                     0    -0.6995777                         0
#>      4:                     0    -0.2284540                         0
#>      5:                     0            NA                         0
#>     ---                                                              
#> 121141:                     0            NA                         0
#> 121142:                     0    -0.2848782                         0
#> 121143:                     0            NA                         0
#> 121144:                     0    -1.2297720                         0
#> 121145:                     1    -8.6202741                         0
#>               racr target_share air_yards_share       wopr special_teams_tds
#>      1:  0.0000000   0.05263158      0.00000000 0.00000000                 0
#>      2:  0.0000000   0.11764706      0.00000000 0.00000000                 0
#>      3:  0.0000000   0.02380952      0.00000000 0.00000000                 0
#>      4:  0.0000000   0.05000000      0.00000000 0.00000000                 0
#>      5:         NA           NA              NA         NA                 0
#>     ---                                                                     
#> 121141:         NA           NA              NA         NA                 0
#> 121142: -1.4444444   0.10000000     -0.04411765 0.11911765                 0
#> 121143:         NA           NA              NA         NA                 0
#> 121144:  0.1666667   0.06060606      0.02298851 0.10700104                 0
#> 121145: -1.0526316   0.12500000     -0.25333333 0.01016667                 0
#>         fantasy_points fantasy_points_ppr
#>      1:           12.7               13.7
#>      2:            5.1                8.1
#>      3:            0.2                0.2
#>      4:            3.5                5.5
#>      5:            3.9                3.9
#>     ---                                  
#> 121141:           14.8               14.8
#> 121142:           17.0               19.0
#> 121143:           28.7               28.7
#> 121144:           11.2               12.2
#> 121145:           24.9               27.9
# }