ropensci/stats19

`dl_stats19` should also do multiple years

layik opened this issue · 1 comments

layik commented

just like #99 and other minor issues

stats19::dl_stats19(2017:2018)
#> Warning in if (year %in% 1980:2003) {: the condition has length > 1 and only the
#> first element will be used
#> Warning in if (year %in% 2006:2008) {: the condition has length > 1 and only the
#> first element will be used
#> More than one file found, selecting the first.
#> Files identified: dftRoadSafetyData_Accidents_2017.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/dftRoadSafetyData_Accidents_2017.zip
#> Attempt downloading from:
#> Data saved at /var/folders/z7/l4z5fwqs2ksfv22ghh2n9smh0000gp/T//RtmpB5d9Pk/dftRoadSafetyData_Accidents_2017/Acc.csv

Created on 2020-12-07 by the reprex package (v0.3.0)

layik commented
stats19::dl_stats19(2017:2018)
#> Downloading 2 files.
#> Files identified: dftRoadSafetyData_Accidents_2017.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/dftRoadSafetyData_Accidents_2017.zip
#> Attempt downloading from:
#> Data saved at /var/folders/z7/l4z5fwqs2ksfv22ghh2n9smh0000gp/T//RtmphyJb2Q/dftRoadSafetyData_Accidents_2017/Acc.csv
#> Files identified: dftRoadSafetyData_Accidents_2018.csv
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/dftRoadSafetyData_Accidents_2018.csv
#> Attempt downloading from:
#> Data saved at /var/folders/z7/l4z5fwqs2ksfv22ghh2n9smh0000gp/T//RtmphyJb2Q/dftRoadSafetyData_Accidents_2018.csv

Created on 2020-12-08 by the reprex package (v0.3.0)