elad661 / curlbus

Terminal based UI for Israeli public transit data
41 stars 7 forks source link

special-casing for Israel Railways #3

Closed elad661 closed 6 years ago

elad661 commented 6 years ago

Israel Railways lines only have long_name, and no short_name, so there aren't really any meaningful numbers to be used for filtering on /rail/{route_number}

I need to come up with a system to assign numbers/short English names to the rail route numbers, and to have an index of them in /rail or /rail/routes.

elad661 commented 6 years ago

Israel Railways has 68 route variations - including partial versions of some lines off-peak, temporary services during station closures, etc. A passenger doesn't are about these variation, and only cares about the ~13 "official" lines that are represented on Israel Railways map.

Questions:

cc: @yuvadm what do you think?

yuvadm commented 6 years ago

Agree that train route don't really make sense. I guess the best and easiest use case would probably be to just show me which trains are arriving at a specific station. So something like /rail/stations sounds reasonable if it's easy to implement.

elad661 commented 6 years ago

Added /rail/stations as an easy shortcut to get station codes. Please try it and let me know if you have any feedback :)

I might implement some of the other ideas in my previous comment later (and maybe even fuzzy station search by name, not sure).

yuvadm commented 6 years ago

Works great! Lots of inconsistencies in the station names though, but that's probably not your fault.

elad661 commented 6 years ago

I didn't write them myself, I'm using the MoT dataset directly. It's full of spelling inconsistencies and mistakes,.

For example, they think "Nat-bg" is a name that make sense, they sometimes have " as an acronym separator in English, they spell Modi'in in at least 5 different ways, and sometimes have '' in the source strings and " in the translations table or vise versa, causing lookups to fail (I have a quirk for this in curlbus).

One of the most glaring errors I've noticed in the past is that they translated "חיים לבנון" to "Life Lebanon".

Since the dataset is so large and the errors are basically everywhere, it's probably not worth the time&effort to correct these issues.

yuvadm commented 6 years ago

:woman_facepalming: