-
Notifications
You must be signed in to change notification settings - Fork 17
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
error handling - column headings #54
Comments
Yeah, absolutely worth adding, thanks @dcooley! Feel free to PR if you want, otherwise I'll get around to it within the next couple of weeks, I'd reckon. Melbourne is interesting because of all of the separate feeds from separate providers with no transfers (buses to trams, trams to trains, ...). I'd love somebody to take the new |
yeah I was trying nbs[which(!nbs %in% service_stops)] returned 0 results every iteration. I didn't go any further into it, but did read through the other issue to see if I could understand the logic a bit better. I'll see if I can find some more time on it this weekend. |
Or just put a wee reprex here, and I'll dig in with you |
Update: I can't reproduce your initial buggy behaviour. I don't get any rogue characters at all, and everything is read just fine. I'm sure bugs will arise in this regard, but they are also more likely to be in non-UTF or whatever encoding of names of agencies, routes, headsigns, and stops. So if something like your code were to be incorporated, I suspect it would need to be a comprehensive rectification of all potential encoding problems. A naive solution would be to |
This should hopefully all be addressed via #84, but i'll keep the issue open to ensure everything is okay |
Working with Melbourne's transit feed is not always straight forward, and this morning I ran into this particular issue which tripped me up for a few hours, where the column heading has a non-Ascii symbol in it.
So my request is, is it worth adding in a 'clean column names' -type function when extracting the feed to try and handle this?
Here's the exmaple
I found this issue when running
gtfsrouter:::join_service_id_to_stops()
, as it gave me allNA
s fortrip_id
So diving into the
stop_times
object I found the issueCopying this output back into my script highlighted the rogue character
This is fixed by the
iconv()
command.Is something like this worth adding to
gtfsrouter
?The text was updated successfully, but these errors were encountered: