LACMTA / gopass-lookup

Lookup for schools participating in Metro's GoPass program
https://mygopass.metro.net
GNU General Public License v3.0
0 stars 2 forks source link

Feat: school aliasing (LA <-> Los Angeles) #79

Open dexo568 opened 2 months ago

dexo568 commented 2 months ago

Deals with this issue from #72:

Schools like "East LA College" not showing up when you type in "East Los Angeles College"

I added an aliasing step in clean-school-data-tap.js, wherein anything with substring 'LA' or 'Los Angeles' will be given an 'alias' key with 'LA' written out as 'Los Angeles', or vice-versa. This allows better searchability, because searching eg "east los angeles college" will now index on "East LA College", because it has an alias of "East Los Angeles College".

Right now the only alias is LA <-> Los Angeles, but if there's any other aliases you'd like to include, feel free to add them in the alias_map in clean-school-data-tap.js.

Just an aside, I also slightly modified the package-json curl request syntax because curl throws a fit if you use single-quotes on Windows (AKA my dev machine). I think my modified CURLS should run on all platforms, but feel free to get rid of that part of the pull if it causes any problems.