-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downloading vehicles from 2020 #237
Comments
Thanks for flagging the issue and the PR. I have also noticed some weird behaviour, just have had limited time to look into them. So very grateful for the report and fix, will take a look and test ASAP. |
Having spent some time on this I think I know the issue here @BlaiseKelly. The core of the issue is that for that year and any other year where "escooter" data such that two files are shown like: Multiple matches. Which do you want to download?
1: dft-road-casualty-statistics-vehicle-e-scooter-2020-Latest-Published-Year.csv
2: dft-road-casualty-statistics-vehicle-2020.csv stats19 currently reads the first file. I am not sure if the package is even equipped to deal with e-scooter data. Sorry cannot send a fix yet.. |
Let's just remove the e-scooter files from the list for now is my thinking. |
I pushed this fix a few weeks ago BlaiseKelly@bcf1561 which works for me. I am using this version with no problems, but it fails the automatic CRAN checks, i think maybe too many changes in one go. |
Thanks Blaise, will look to merge ASAP. In fact will take a look at #238 right now.. |
I deleted the previous pull request and submitted another with only the code changes (and no qmd files!). Hopefully this is clearer. |
Sorry this has gone stale. I think things have moved on now so closing. If you could please check you can get the data you need that would be greatly appreciated @BlaiseKelly . |
Yes, just tested with the latest version and definitely works now. Thanks Robin! |
This is a reopening of issue 216 #216 which had a work around but didn't appear to be fixed.
It seems to be related to the locate_file functions which are difficult to debug as there are so many nested functions.
However, the dl_stats19 function either downloads the data or identifies the file in the local directories. Either way the directory of the data is known by the end of this function. So it maybe simplifies things if this just returns the full path of the one file that is being requested (only one year or type is allowed to be requested at any one time). This also negates many of the read functions.
Also it seems like 2020 is the only year that has two files for a specific type. It looks like the e-scooter dataset is unique to 2020. It is nice to have this data but I think it makes sense that if ask = FALSE then it defaults to dft-road-casualty-statistics-vehicle-2020.csv which is the same file as is available for other years after 2017.
Have submitted a pull request for these changes.
The text was updated successfully, but these errors were encountered: