-
Notifications
You must be signed in to change notification settings - Fork 9
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
Improve consistency with gtfstio #48
Comments
Hi @mpadge, thanks for opening this issue. I agree that having The second error also seems to be related to gtfsio. It's hard to tell without the GTFS, but I suspect that gtfsio is not finding the correct specification to headway_secs column because it should look for the column type inside the |
The slowness will be absolutely no issue if everything is memoised. I use that approach in a heap of my packages, most notably in It's an interesting case in terms of GitHub structure and functionality, because we need some kind of master issue which equally affects all separate repos, but that's not currently possible. Don't know the best solution for where and how to continue discussion in a coordinated way? As for the bug - I can easily reproduce it locally, so will do so, debug, and hopefully submit a PR. Thanks! |
Sorry if this has been answered, but is there now a work-around for the character as integer problem with the frequencies to travel time function? |
Not yet @randl068. If you're coming across this issue it's probably because you also have a "nested GTFS". If that's the case, you could try unnesting it manually and then using gtfstools to read it as usual. |
If that's not the cause of the issue here (i.e. you don't have a nested GTFS) then I'll need to know more about the feed you're using and in which context you're trying to using the function to understand what might be the problem. |
Could you explain what it would mean to manually unnest the GTFS? |
I'm assuming you have a zip file that contains a directory, inside which there are the GTFS tables. Is that correct? If so, I'd suggest moving the GTFS tables outside the directory, and then removing the directory altogether. If you want to do it with R, I suspect the best way would be to unzip the file .zip to a temporary folder, move the tables inside the directory to the top-level temporary folder, delete the now-empty directory and then zipping the contents of the temporary folder. |
Wonderful, thank you! |
Closing this issue in favor of r-transit/gtfsio#29. |
@dhersz I find the following behaviour somewhat confusing:
Created on 2022-01-31 by the reprex package (v2.0.1.9000)
I would expect the first to be handled internally, and not to error like that. I suspect the best - and definitely least confusing - way to achieve that would be to entirely ditch the
gtftools::read_gtfs
function, so all packages can always rely ongtfsio::import_gtfs()
. You could then just have one additional wrapper function at the start of allgtfstools
functions which calls the additionalnew_gtfs
andconvert_from_standard
functions. (If that slowed things down, you easily justmemoise
the calls so conversion would be instantaneous.) Havingread_gtfs
here is really quite confusing for me, and I considered myself "internal" to this whole ecosystem - that must mean we should presume it is even more confusing for any general users.The second example appears to be a small 🐛 here. Sorry for not submitting exactly reproducible code, but it's hard these days with transit.feeds in private s3 buckets. That's the feed referred to in r-transit/gtfsio#25 - an older version of the Madrid metro system.
The text was updated successfully, but these errors were encountered: