jimmyday12 / fitzRoy

A set of functions to easily access AFL data
https://jimmyday12.github.io/fitzRoy
Other
129 stars 27 forks source link

fetch_results_afltables() parsing errors with readr 1.9.9.9000 #156

Closed hamgamb closed 2 years ago

hamgamb commented 3 years ago
fitzRoy::fetch_results_afltables(2021)
#> Warning: 13179 parsing failures.
#> row col  expected     actual                                               file
#>   1  -- 8 columns 9 columns  'https://afltables.com/afl/stats/biglists/bg3.txt'
#>   2  -- 8 columns 10 columns 'https://afltables.com/afl/stats/biglists/bg3.txt'
#>   3  -- 8 columns 9 columns  'https://afltables.com/afl/stats/biglists/bg3.txt'
#>   4  -- 8 columns 10 columns 'https://afltables.com/afl/stats/biglists/bg3.txt'
#>   5  -- 8 columns 10 columns 'https://afltables.com/afl/stats/biglists/bg3.txt'
#> ... ... ......... .......... ..................................................
#> See problems(...) for more details.
#> Warning: Expected 3 pieces. Missing pieces filled with `NA` in 4456 rows [4, 5, 7,
#> 12, 14, 19, 21, 23, 28, 30, 40, 44, 48, 55, 66, 69, 73, 76, 82, 84, ...].
#> Warning: Expected 3 pieces. Missing pieces filled with `NA` in 7816 rows [2, 4, 5,
#> 7, 12, 14, 16, 19, 20, 21, 23, 27, 28, 30, 32, 33, 35, 40, 42, 44, ...].
#> # A tibble: 72 x 16
#>     Game Date       Round Home.Team      Home.Goals Home.Behinds Home.Points
#>    <dbl> <date>     <chr> <chr>          <chr>             <int>       <int>
#>  1 15777 2021-03-18 R1    Richmond       15                   15         105
#>  2 15778 2021-03-19 R1    Collingwood    7                    11          53
#>  3 15779 2021-03-20 R1    Melbourne      11                   14          80
#>  4 15780 2021-03-20 R1    Adelaide       15                   13         103
#>  5 15781 2021-03-20 R1    Essendon       13                   13          91
#>  6 15782 2021-03-20 R1    Brisbane Lions Lions                NA          NA
#>  7 15783 2021-03-21 R1    North          Melbourne            NA          NA
#>  8 15784 2021-03-21 R1    GW             Sydney               NA          NA
#>  9 15785 2021-03-21 R1    West           Coast                NA          NA
#> 10 15786 2021-03-25 R2    Carlton        13                    7          85
#> # ... with 62 more rows, and 9 more variables: Away.Team <chr>,
#> #   Away.Goals <chr>, Away.Behinds <int>, Away.Points <int>, Venue <chr>,
#> #   Margin <int>, Season <dbl>, Round.Type <chr>, Round.Number <int>

Created on 2021-05-13 by the reprex package (v2.0.0)

Not a huge issue, just something I ran into after trying out the new readr.

jimmyday12 commented 3 years ago

I have a feeling this is now fixed with https://github.com/jimmyday12/fitzRoy/commit/c9e13bb39c314bd16e248e2a4f8e9913871874b8. I was working on something else but think it is the same issue. You'll have to install the dev version via devtools::install_github() to get it.

Will try test properly but noticed @neilfws mention it on Twitter

jimmyday12 commented 2 years ago

Believe this is resolved now