Show HN: I built a transit travel time map (map.henryn.xyz)
This was something I built while trying to look for housing in Toronto that was decently transit-accessible to my office while still cheap.
The backend is written in Rust. It parses public GTFS data from transit agencies and performs a simple heuristics-based BFS on the bus lines to calculate how long to reach all points in a city.
The frontend uses React and Mapbox GL to render each individual road segment based on how long it takes to reach.
This project was a great excuse to learn Rust, deployments, and mapping. The source code is here if you are interested: http://github.com/econaxis/time2reach
95 comments
[ 3.3 ms ] story [ 180 ms ] threadAdding support for other cities is a pain in the butt to find the corresponding GTFS, upload the vector tiles to postgis, etc.
It even supports GO buses between Waterloo <-> GTA (unfortunately the max is 3 hours so you can't get everywhere just yet).
Then i enabled all Font and Cosmetic Filtering to ON on uBlock, and the website worked.
One of the few sites that requires Cosmetics / Fonts enabled to work right.
(I initially thought they were just bookmarks/shortcuts to some good demos then I realized they influenced the traffic sources checkbox at the bottom so they had to determine what the map showed rather than merely index it.)
For example, there are many parts of Brooklyn where no transit lines are directly connected and you have to go into Manhattan first, meaning if you took the train it would take 1+ hours, versus bus (30 minutes) or biking (15 minutes).
Edit: Though, CityMapper doesn't actually provide a travel time map, alas.
I started using Transit App more often for the mixed-modes routing. It even supports bike shares/scooters, so sometimes it suggests new routes based on scooter -> subway -> scooter which is much faster than bus -> subway -> bus.
People interested in this might also enjoy: https://www.mapnificent.net/
Or if you're in Ireland: gaffologist.com (disclaimer - I made this and it only focuses on rail)
It has some minor limitations to select the time (has to one of the predefined options). That can be worked around by changing the URL parameter.
It can also map out multiple locations and see the overlap.
It's fairly useful to see where you want to live while taking e.g. the office location into account. It gave me more options than I thought I had, partly because I didn't think about small towns with a train station.
There's also https://www.chronotrains.com which was another inspiration when building this project too.
haha just kidding...I'm unsure of whether this is useful at all to transit companies, but one goal of this project is to make transit cool and help people understand their cities better.
I originally built this to help me find housing in Toronto, so deciding where to live could be another good use of this tool :)
https://en.wikipedia.org/wiki/Isochrone_map
I made one of these in the past when looking for places to live in London. The ultimate conclusion was that you could have inexpensive, short travel time, or nice/safe, choose two.
I gave up after realising that the market signals worked - if ignoring Central London it'd pretty much just be "more expensive = nicer"
If anyone has lived or at least visited places like Tokyo, Japan or Shanghai, China, you probably understand what I am referring to.
This will make their requests for more money/raises/etc seem absolutely insane when you compare what these countries/cities/agencies do WRT to transporting millions of people efficiently every single day - and not to mention just how clean such systems are.
When you go through stations in HK - you see well-uniformed cleaning folks all over the place.
In general, population density in East Asia is far higher than in the US.
Europe is not immune either, they would've followed the US's footsteps entirely if it weren't for the 1973 oil shock, which hit them harder than the US.
Popular explanation but largely false. They were destroyed because people quit using them.
The story often goes that someone destroyed a fully operational system for profits when in fact the system was badly deteriorated and not really used a lot.
I'm not especially pro-suburbia--I live in an exurban/almost rural location. But I think it's perfectly understandable why many people wouldn't live in a city given a choice which they increasing had post-WWII in the US.
Seems like you'd be S.O.L. unless the government kindly free-markets a continent-wide network of paved roads, with conveniently placed roadside stops along the way where they sell gasoline. Can't imagine why they would undertake such an exorbitant public works project when the transcontinental railroad already exists; it's not like the government is disproportionately influenced by any industries that would very obviously materially benefit from such a thing.
I'm sure that Roger Rabbit might be more true for some cities, but I dislike that LA and other cities cling on to this. It excessively absolves everyone else -- politicians, press, homeowners, and PE/LARy themselves -- of their own fault. They could've saved their transit system like London did in the 1920-30s. Even today every SFR owner seems to prefer pointing at the Roger Rabbit story rather than looking in the mirror. Thank god for AB2097 and other new laws that address low density.
Sources -- basically any source that's not Roger Rabbit will tell you the same thing:
* http://scsra.org/library/rapid-transit-history/
* https://laist.com/news/entertainment/union-station-history
* https://www.vox.com/2015/5/7/8562007/streetcar-history-demis...
* This entire book; the preview pages have a lot of pertinent parts: https://books.google.com/books?id=OfTlph3cXoQC
If you look at a top 10 list of best transit systems, you’ll see medium density cities like Oslo and Helsinki right beside Tokyo and Hong Kong.
Or within the USA, compare Miami to Seattle. The only difference is that one city decided to build mass transit and the other didn’t.
It’s entirely possible to build an appropriate transit system for any type of city.
However, things get too spread out and it breaks down--including that transit runs on a sufficiently spaced-out schedule that people with a choice just don't want to take it.
Coming from the SF Bay Area, if you miss a train you'll probably have a minimum 15 minute wait (at least at the stations and times I use), often 2-3x more. People run down the stairs to the platform, shove their way in, and often block the doors from closing if they're squeezing in at the last minute (which extends the last minute, making the train later for the next stop.)
Also, "taking the train" doesn't just mean showing up at the train station. It means checking the schedule and timing it so you show up at the right time. I don't just walk from place to place, using the train as a way of getting around as needed. I plan it out. Or I don't, and use a car instead, which everything subtly encourages.
I agree, frequency makes a huge difference in actual practice.
But the commuter rail out to me only runs about once an hour. I can deal with that for a "9 to 5" work thing where driving would have to deal with horrific traffic anyway. But it's a total non-starter for an evening event where I would have to time my return including possibly dealing with subway variance to a commuter rail station. (And it takes significantly longer than driving at that time of day anyway.)
The denser the population the better mass transit works and the more burden having one's own car produces.
Today I'm stuck on a tram for an hour and the tram company did not even tell us what happened or when would we be unstuck.
https://www.forrestthewoods.com/blog/visualizing_commute_tim...
AFAICT the only reliable source of commute and transit times is Google Maps. To be useful it requires real traffic data. Unfortunately Google jacked up the prices way too high to be useful.
My dream is a service for building isochrone maps with full support for walking/biking/transit/driving.
https://app.traveltime.com/search/0-lat=43.64399&0-lng=-79.3...
I do think there are a number of things you could do to improve the UX here. Hope this doesn't come across as too harsh, but here are some suggestions...
1. Double-click to set origin makes sense, but hover to set a destination is a bit weird, for two reasons: a. There's no way to "lock" a destination by clicking, so I can't pick a route I want to see and fix my view on it. The UI feels jittery as a result. b. In some cases (I'm looking at NYC), loading the route to the hovered destination hangs for several seconds. I don't know if this is just an issue because your server is overloaded, but it's a weird state to be in.
I'd consider: 1) adding a loading state when the route to the destination is being computed, 2) enable clicking a point to lock viewing that route, 3) maybe disabling the hover interaction entirely, though if it were performant, it would be pretty nice to have.
2. The "arrival time" concept is a slightly odd. I'd prefer to just see the amount of time it'll take to get to a destination, rather than an arrival time based on a particular starting time. I don't think anyone's going to use this to plan a specific route at a specific time; instead, they'll use it to explore locations of interest, and explore how long it'll take to get to various destinations. I see you show the trip duration in the bottom-left, but having it be an arrow pointing to a gradient spectrum is much harder to parse than just saying "27 minutes".
3. The fade effect on the side panel is a bit weird. It does draw more attention to the map, but the side panel is still occluding my view, and having it faded just makes the text very hard to read. I'd consider making it un-faded, but adding some way to collapse it.
1. Yes I think "locking" makes sense. The entire action of viewing the paths to different destinations still needs to be polished up, especially for the mobile version as well. When I tried it before posting to HN it was instant (30ms) but now it seems to be extra laggy because the CPU is maxed. I just upgraded the server from 4 -> 16 cpus, so let's hope that does something haha.
2. 100%
3. Agree as well. I chose the easiest solution when developing (and I also develop on a large monitor so it's harder to notice the occlusion), but adding a hide toggle would certainly have been better.
There's nothing odd about it. Your arrival time entirely depends on the train schedule, and you can only arrive at your destination at certain discrete times because of this.
>I don't think anyone's going to use this to plan a specific route at a specific time;
I use Google Maps to do this exact thing all the time. I need to be at a certain place at a certain time, so I set the place and arrival time and have it plot a route and show me all the available options.
Like, if I want to buy something big from Walmart or Costco (to keep to generic shop names) and it does not matter if I am on a train/metro/subway for 10 minutes or 20 minutes, but it totally does matter number of transport switches of bus->subway) and walking is really bad.
So, it would make sense to go to a very distant shop, but that is right opposite the direct train.
Does anything like this exist (for any city really)? The algorithm must be quite similar, but with different graph steps weighted differently depending on method of movement.
For example, when choosing the best route, it penalizes every transfer by 120 seconds [1]. Therefore, a route that takes 2 minutes longer is equivalent to one transfer.
It'd be cool to have a tool where you can dynamically change these settings, and maybe even have different transfer penalties depending on if you're transferring inside a station vs walking outside.
[1]: https://github.com/econaxis/time2reach/blob/main/src/formatt...
An more general alternative (different travel modes and all the cities I think, possibly less accurate, no lovely heat-map style): https://app.traveltime.com
E.g. pick a point on a map, sum the area of the isochrone (30minute area? weighted sum?) to get a value at that point. Then redraw a heatmap of those points.
I work on some of the rust libraries you've used. If you'd like to ask questions about rust+geo or do a show & tell, consider joining us in the georust discord: https://discord.com/invite/Fp2aape
I'm also always interested to hear new people's experience building real things with our libraries. What were the hangups?