[iRail] MIVB GTFS data set troubles

Amit Uttam amit at allyapp.com
Fri Sep 11 17:17:32 UTC 2015


Hi iRail... hopefully this is the right place to post my question about
valid CSV GTFS data for MIVB? If not, please advise....

Short version:
Can the " (double quote) character in trip and route ids in MIVB GTFS data
be replaced with ' (single quote) character, or removed altogether?

--------

Long version:

I'm pulling the zipped CSVs from here:
http://gtfs.irail.be/mivb/mivb-gtfs.zip

This data contains routes with id's that look like this:

*086b-"MACHTENS - GARE CENTRALE"*

*002m-"SIMONIS - ELISABETH"*
etc.

This data fails the CSV lint lest. It's technically an invalid CSV file
because of the use of the double-quote character ("). Excel and other tools
cleverly handle this case and don't report trouble. Sadly, most development
libraries break when parsing MIVB's dataset.

Here's a screenshot of the lint report.

[image: Inline image 1]

(the error is a bit misleading because it talks about whitespaces when
there are none.... removing the double-quotes for the first column resolves
the error)

Replacing the " character during consumption of this data isn't much of an
option either, because it is definitely a legitimate delimiter character
elsewhere.... just not in the middle of a piece of data. I also hesitate to
replace " with ' character, because that could be a valid apostrophe in
legitimate data elsewhere...

Please advise.. and thanks!
-Amit @ ally
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/irail/attachments/20150911/c9dcc124/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-09-11 at 14.09.56.png
Type: image/png
Size: 310690 bytes
Desc: not available
URL: <http://lists.okfn.org/pipermail/irail/attachments/20150911/c9dcc124/attachment-0002.png>


More information about the iRail mailing list