ropensci/stats19

Stats19 tables not downloading

joeytalbot opened this issue · 1 comments

See reprex for problem - data downloads using get_stats19 for casualty/accident/vehicle data are failing.

library(stats19)
#> Data provided under OGL v3.0. Cite the source and link to:
#> www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
crashes_all = get_stats19(year = 2019, type = "ac")
#> Files identified: DfTRoadSafety_Accidents_2019.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/DfTRoadSafety_Accidents_2019.zip
#> Attempt downloading from:
#> Warning in utils::download.file(zip_url, destfile = destfile, quiet = silent):
#> cannot open URL 'http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-
#> data/DfTRoadSafety_Accidents_2019.zip': HTTP status was '403 Forbidden'
#> Error in utils::download.file(zip_url, destfile = destfile, quiet = silent): cannot open URL 'http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/DfTRoadSafety_Accidents_2019.zip'
casualties_all = get_stats19(year = 2019, type = "cas")
#> Files identified: DfTRoadSafety_Casualties_2019.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/DfTRoadSafety_Casualties_2019.zip
#> Attempt downloading from:
#> Warning in utils::download.file(zip_url, destfile = destfile, quiet = silent):
#> cannot open URL 'http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-
#> data/DfTRoadSafety_Casualties_2019.zip': HTTP status was '403 Forbidden'
#> Error in utils::download.file(zip_url, destfile = destfile, quiet = silent): cannot open URL 'http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/DfTRoadSafety_Casualties_2019.zip'
vehicles_all = get_stats19(year = 2019, type = "veh")
#> Files identified: DfTRoadSafety_Vehicles_2019.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/DfTRoadSafety_Vehicles_2019.zip
#> Attempt downloading from:
#> Warning in utils::download.file(zip_url, destfile = destfile, quiet = silent):
#> cannot open URL 'http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-
#> data/DfTRoadSafety_Vehicles_2019.zip': HTTP status was '403 Forbidden'
#> Error in utils::download.file(zip_url, destfile = destfile, quiet = silent): cannot open URL 'http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/DfTRoadSafety_Vehicles_2019.zip'

Created on 2021-10-06 by the reprex package (v2.0.1)

We need to fix this to keep it on CRAN according to email. Good news, almost fixed in PR above.

Dear maintainer,

Please see the problems shown on
https://cran.r-project.org/web/checks/check_results_stats19.html.

Please correct before 2021-10-20 to safely retain your package on CRAN.

It seems we need to remind you of the CRAN policy:

'Packages which use Internet resources should fail gracefully with an informative message
if the resource is not available or has changed (and not give a check warning nor error).'

This needs correction whether or not the resource recovers.

The CRAN Team