TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Trains.fyi – a live map of passenger trains in the US and Canada

503 pointsby ryryover 1 year ago
Hey all! My train the other day was delayed and I got curious where they all were at any given time, so I built a map and figured I'd share it.

66 comments

kylecazarover 1 year ago
Wow, I don&#x27;t know why I thought there would be... Way, way more trains active at a given time.<p>I suppose I overestimated passenger rail popularity in this country.. I knew it wasn&#x27;t relatively huge, but there&#x27;s several hundred miles in some cases between trains.
评论 #38436002 未加载
评论 #38436552 未加载
评论 #38435672 未加载
评论 #38437656 未加载
评论 #38437037 未加载
评论 #38438302 未加载
评论 #38442184 未加载
评论 #38443291 未加载
dhosekover 1 year ago
I’d kind of like real-time tracking of <i>freight</i> trains. There’s a BNSF grade crossing between my home and my parents’ and it would be nice to know whether I should take the 1 mile detour to get to the tunnel beneath the rail yard if there’s a train going to be blocking (I suppose it would also help to have info on the length of the trains so I’d know if the train in front of me is almost clear or if there’s another mile of train behind it).
评论 #38442976 未加载
评论 #38446706 未加载
评论 #38443105 未加载
评论 #38442070 未加载
howenterpriseyover 1 year ago
How very convenient! I&#x27;m on this map. My train is in the right position, but I don&#x27;t think the name is quite right: I&#x27;m on the Silver Star but it&#x27;s labelled as the Northeast Regional. Excellent project, though, thanks for posting.
jokteurover 1 year ago
I love these maps. Here is one from Switzerland: <a href="https:&#x2F;&#x2F;maps.vasile.ch&#x2F;transit-sbb&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;maps.vasile.ch&#x2F;transit-sbb&#x2F;</a>, just a tad bit busier than the US
评论 #38445617 未加载
评论 #38443335 未加载
评论 #38443268 未加载
评论 #38450105 未加载
ecshaferover 1 year ago
This is cool, but you are missing NJ Transit which has passenger trains separate from LIRR and Metro North. You are also missing Septa and MTA internal city light rail and subway lines, which are technically passenger trains.
评论 #38441077 未加载
评论 #38439129 未加载
pcdslover 1 year ago
Here&#x27;s a cool one for Tokyo in 3D: <a href="https:&#x2F;&#x2F;minitokyo3d.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;minitokyo3d.com&#x2F;</a>
seedless-sensatover 1 year ago
I am looking at this while sitting on Amtrak. It is about 14mi behind my current position, but still very cool!
评论 #38435282 未加载
评论 #38435418 未加载
cattownover 1 year ago
Super cool! I love this. Makes me yearn for a day when this map is way more full of activity.<p>Just a little feedback: the color for Amtrak and for Chicago&#x27;s Metra trains are so similar it&#x27;s hard to see at a glance where the Amtrak runs are amongst the many Metras that are out at a given time. Would be awesome to differentiate those marker colors a bit more.<p>Very cool! Didn&#x27;t know this was even technically possible with the available data feeds. Great work!
评论 #38438749 未加载
gadcamover 1 year ago
Here is THE MAP for France ! <a href="https:&#x2F;&#x2F;carto.graou.info&#x2F;46.90174&#x2F;1.83822&#x2F;5.4455&#x2F;0&#x2F;0" rel="nofollow noreferrer">https:&#x2F;&#x2F;carto.graou.info&#x2F;46.90174&#x2F;1.83822&#x2F;5.4455&#x2F;0&#x2F;0</a> Shameless plug : we are developping Trainscanner to travel accross Europe <a href="https:&#x2F;&#x2F;www.train-scanner.com&#x2F;?u=hn-c-38434574" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.train-scanner.com&#x2F;?u=hn-c-38434574</a> Do not hesitate to leave us some feedback :)
评论 #38444713 未加载
评论 #38444494 未加载
kingsloiover 1 year ago
Here&#x27;s one more for your list: <a href="https:&#x2F;&#x2F;southshore.etaspot.net" rel="nofollow noreferrer">https:&#x2F;&#x2F;southshore.etaspot.net</a><p>Southshore Line - connecting Chicago, IL (Millennium Station) to South Bend, IN, via East Chicago, Gary, Chesterton, etc
评论 #38438781 未加载
reactordevover 1 year ago
I believe there was a quote from a railroad exec that Passenger rail traffic accounts for only 3% of the overall rail traffic in North America. If true, the map would be covered with Locomotives if freight was included (GP-40&#x27;s are my favorite).
评论 #38436115 未加载
firebazeover 1 year ago
Kind of underwhelming. Superb work, but the average distance between trains is, like, at least 500 miles? This is what the opposite of public transportation looks like, unfortunately.<p>What would that map look like if even 5% of the annual military budget of the US would be invested in trains?
Readeriumover 1 year ago
India <a href="http:&#x2F;&#x2F;railradar.railyatri.in&#x2F;" rel="nofollow noreferrer">http:&#x2F;&#x2F;railradar.railyatri.in&#x2F;</a><p>You will be baffled by the amount of trains.
loxiasover 1 year ago
Cool! Super cool!<p>Would love to see where the data&#x27;s coming from -- with enough detail that I can spin up my own instance and shove the geo data in a database. (Unless you plan on making money from this, that is. The fact that you&#x27;re aggregating a dozen random feeds with their own format into one schema is 100% &quot;all the work&quot;)<p>I wanted to do this for ADSB data, but couldn&#x27;t figure out how to get any quantity of data without paying money.
vzalivaover 1 year ago
It shows the sad state of the public train system in the US. For comparison, here is a similar map for the UK:<p><a href="https:&#x2F;&#x2F;www.map.signalbox.io&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.map.signalbox.io&#x2F;</a>
评论 #38441348 未加载
sz4kertoover 1 year ago
We have something similar in Hungary:<p><a href="http:&#x2F;&#x2F;vonatinfo.mav-start.hu&#x2F;" rel="nofollow noreferrer">http:&#x2F;&#x2F;vonatinfo.mav-start.hu&#x2F;</a><p>Pretty cool, it&#x27;s a shame that the actual (state-owned) trainlines are in shambles.
s9gover 1 year ago
Looks like the Alaska Railroad doesn&#x27;t have any publicly available location data on their site - <a href="https:&#x2F;&#x2F;www.alaskarailroad.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.alaskarailroad.com&#x2F;</a><p>Which is a shame, because I actually worked on a live train map internally when I was an intern there a decade ago.
svarlamovover 1 year ago
Love this project! Can you tell us a bit about what stack you used to build this? Were there easy-to-use APIs to get this data in realtime?
评论 #38435142 未加载
评论 #38435178 未加载
mournerover 1 year ago
A lovely map — thanks for using Leaflet and keeping that little Ukrainian flag in the corner! Probably needs an attribution for the map added too (looks like it&#x27;s Carto with an OpenStreetMap-derived basemap).
评论 #38438775 未加载
NelsonMinarover 1 year ago
Very nice! A companion to Rachel Binx&#x27; Amtrak Explorer, which shows routes. <a href="https:&#x2F;&#x2F;amtrakexplorer.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;amtrakexplorer.com&#x2F;</a>
niemenmaaover 1 year ago
Congrats on the launch! Very nice project.<p>Do you have any estimation of what percentage of passenger train traffic is currently displayed vs. still to be implemented? As others have mentioned, I also was little bit surprised of the (small?) amount of trains on the map.<p>Similar map for Finnish trains: <a href="https:&#x2F;&#x2F;www.vr.fi&#x2F;en&#x2F;live-train-tracker-map" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.vr.fi&#x2F;en&#x2F;live-train-tracker-map</a>
评论 #38443358 未加载
quartzover 1 year ago
It would be cool to see an equivalent map for freight rail.<p>These threads always focus on the lack of passenger rail service in the US but ignore that the US also has one of the largest, safest, and most efficient freight rail systems in the world[1]. I&#x27;d love to see it live!<p><a href="https:&#x2F;&#x2F;railroads.dot.gov&#x2F;rail-network-development&#x2F;freight-rail-overview" rel="nofollow noreferrer">https:&#x2F;&#x2F;railroads.dot.gov&#x2F;rail-network-development&#x2F;freight-r...</a>
评论 #38437493 未加载
评论 #38436356 未加载
评论 #38436221 未加载
评论 #38436442 未加载
评论 #38436169 未加载
评论 #38440107 未加载
anjelover 1 year ago
Very cool. Why are NJ Transit trains unreported?
评论 #38435932 未加载
phyphyover 1 year ago
Here in India we have an app named &quot;Where is my train?&quot;. Local people use this app a lot when traveling by train. It&#x27;s not government owned either and has no ads. Just throwing in here for some inspiration since I don&#x27;t know the inner workings of that app.<p>Edit: It uses nearby cell towers to estimate the location of train
评论 #38443937 未加载
yasonover 1 year ago
In Finland I&#x27;ve been using a similar tool for years now when picking up family members from railways stations and when getting out from the station and out to the platform to board a train: <a href="https:&#x2F;&#x2F;www.vr.fi&#x2F;en&#x2F;live-train-tracker-map" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.vr.fi&#x2F;en&#x2F;live-train-tracker-map</a><p>It&#x27;s incredibly more helpful than timetables (printed or online) or late train announcements and trying to find the right train names and numbers. Instead of identifying the right train, then checking the latest changes for that train on the schedule board and wondering if &quot;3 minutes late&quot; really means &quot;3 minutes&quot; you just look at the map and see, oh there&#x27;s my train half way here from the previous town, I&#x27;ll go have a cuppa.
Kon-Pekiover 1 year ago
If you want to add the Chicago transit train location data, the API documentation and API key request form are available here:<p><a href="https:&#x2F;&#x2F;www.transitchicago.com&#x2F;developers&#x2F;traintracker&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.transitchicago.com&#x2F;developers&#x2F;traintracker&#x2F;</a>
com1over 1 year ago
There is also TRAVIC (<a href="https:&#x2F;&#x2F;travic.app" rel="nofollow noreferrer">https:&#x2F;&#x2F;travic.app</a>) by the University of Freiburg, Germany which visualizes transit data worldwide, both live and interpolated from timetables.
thomasahleover 1 year ago
I didn&#x27;t know there was a trans-Canadian railroad. Did anyone try it?
评论 #38435830 未加载
评论 #38435076 未加载
评论 #38435658 未加载
评论 #38441200 未加载
monlockandkeyover 1 year ago
Busses would be soo much better if there was real time location of busses and trains that you could view on a map. Probably the lowest hanging fruit to pick for public transport improvement.
评论 #38437690 未加载
评论 #38438148 未加载
Lammyover 1 year ago
Very cool. Please add SMART! <a href="https:&#x2F;&#x2F;sonomamarintrain.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;sonomamarintrain.org&#x2F;</a>
评论 #38438806 未加载
hexane360over 1 year ago
Any plans to support Denver&#x27;s commuter trains (RTD)?
评论 #38438829 未加载
matthewbauerover 1 year ago
Really cool idea. Would be neat to also be able to click railways as well. I think openrailwaymap provides some cool details like owner, max speed, electrification.<p>I also noticed the map makes it look like the trains are travelling slightly south of the track. It seems to converge once you zoom in though, so I think the data is probably accurate, but somehow the map is distorting things.
bonestamp2over 1 year ago
This is really cool and I&#x27;ve already found a couple of lines that went further than I realized. This is going to make me use trains more!<p>On that note, one feature that would be really helpful is if I selected a particular train, that it would show me where the stations are on that line. Maybe the train company would even give you a commission if I clicked through and bought a ticket.
eskibarsover 1 year ago
I love it! I made a mashup of video feeds and live train locations to show you video feeds from trains that are about to show up: <a href="https:&#x2F;&#x2F;train.api.connelly.casa&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;train.api.connelly.casa&#x2F;</a><p>This gives me lots of ideas of additional agencies to include! Maybe we should join forces :)
Galacta7over 1 year ago
This is pretty cool. I hope you&#x27;ll add MARC and Brightline trains as well, as your app evolves.
评论 #38436408 未加载
divbzeroover 1 year ago
This is very cool.<p>For US inter-city rail there is also Amtrak’s official <i>Track Your Train</i>: <a href="https:&#x2F;&#x2F;www.amtrak.com&#x2F;track-your-train.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.amtrak.com&#x2F;track-your-train.html</a>
achileasover 1 year ago
What was behind the decision to include just commuter rail and long-distance passenger rail, but not local rapid transit? Is it a resource issue drawing that many vehicles? I love this map, but I&#x27;d love to see it with more modes of transport.
评论 #38438626 未加载
jmspringover 1 year ago
Nice project. It looks like there are a couple of map layers? Because if you look at Truckee, California (near Reno), it looks like you have two text blocks trying to both show Truckee.
aFrenchyover 1 year ago
There is a very nice french version which has been running for years: <a href="https:&#x2F;&#x2F;carto.graou.info&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;carto.graou.info&#x2F;</a>
Fiahilover 1 year ago
I don&#x27;t think it&#x27;s working properly. Most (if not all?) trains are going at around 40-20 km&#x2F;h. Why would they all stop in the middle of nowhere like this ?
评论 #38445566 未加载
jmac01over 1 year ago
This is so cool! It&#x27;d be nice to get some more info on the info windows. Like a photo of the train would be awesome (similar to the plane trackers)!
Symbioteover 1 year ago
Similar for Great Britain: <a href="https:&#x2F;&#x2F;www.map.signalbox.io&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.map.signalbox.io&#x2F;</a>
评论 #38436129 未加载
_whiteCaps_over 1 year ago
It would be neat if you could include the West Coast Express trains in Vancouver that are part of Translink. They&#x27;re weekday commuter rail trains.
mkjover 1 year ago
Nice work. A small thing, are the marker icons aligned to their top left corner? Seems like they&#x27;d be better aligned to the middle of the icon.
sneed_chuckerover 1 year ago
I guess this is only Amtrak?<p>Because it doesn&#x27;t seem to show the active passenger light rail systems in several cities and metro areas.
nittanymountover 1 year ago
this map seems only show a portion of all running passenger trains ?<p>I just drove by a train station, one train passed by, not on this map, haha
评论 #38436088 未加载
s-xyzover 1 year ago
Are you sure this is complete? There are really few trains and most are driving at a very low speed.
评论 #38437343 未加载
ionwakeover 1 year ago
Are there missing trains on this map or are there really states with no active trains ?
FalconSenseiover 1 year ago
Whoa, Canada is so sad and empty
评论 #38441516 未加载
评论 #38441192 未加载
geniiumover 1 year ago
The most shocking for me is ... the small amount of trains on that map
flockonusover 1 year ago
Is there something like this project but for cargo trains?
hnthrowaway0315over 1 year ago
Nice! Is there a way to track every freight train as well?
alienrebornover 1 year ago
No NJ Transit trains?
评论 #38435595 未加载
MBCookover 1 year ago
Neat. Is there anything like this that shows freight?
benwerdover 1 year ago
I was honestly ready for this to be one sad train icon chugging its way across the United States. I&#x27;m really pleased to see it&#x27;s more than that.<p>But not <i>much</i> more, and it makes me so sad that we undervalue real public transportation here. I wish we could do better.<p>Still! This is something! And this website is cool!
albert180over 1 year ago
Does it show all 5 daily trains at once ?
ecloover 1 year ago
love the UI! So easy to understand
nilsbungerover 1 year ago
It&#x27;s sad that even great potential routes like SF-&gt;LA aren&#x27;t accessible by train, and we don&#x27;t seem to have the state capacity to build HSR there.<p>I was just in Japan, and took the Shinkansen from Tokyo to Kyoto, which is a similar distance as SF to LA.<p>That train:<p>- runs every 10 minutes -- if you miss one, just take the next one!<p>- takes 2.5 hours travel time<p>- starts and ends in city centers on both ends.<p>- has better legroom and wider seats than economy<p>- free, fast Wifi on board, your cell signal still works, and you can use your computer the whole trip.<p>- has no security or boarding hassle. You can show up 5 minutes before departure and just get on.<p>- has no luggage limitations AFAICT<p>It&#x27;s faster and far less stressful than flying SF to LA, with the security and boarding hassles, Ubers on both ends, and cramped onboard conditions.
评论 #38439093 未加载
评论 #38439101 未加载
评论 #38438748 未加载
评论 #38439170 未加载
评论 #38438927 未加载
评论 #38438383 未加载
评论 #38439133 未加载
评论 #38438161 未加载
评论 #38440093 未加载
chandlerswiftover 1 year ago
Would you please add an OpenStreetMap attribution[0]? It looks like you&#x27;re using OSM data via OpenRailwayMap (which also requires its own attribution[1]) and Carto basemaps (which I&#x27;m not terribly familiar with, but at first glance appear to be based on OSM data[2])---each of which detail their respective attribution requirements.<p>Leaflet makes this incredibly simple; just add the suggested text to the attribution field when you initialize the layers:<p><pre><code> L.tileLayer(&#x27;https:&#x2F;&#x2F;{s}.basemaps.cartocdn.com&#x2F;light_all&#x2F;{z}&#x2F;{x}&#x2F;{y}{r}.png&#x27;, { maxZoom: 19, attribution: &#x27;&#x27; &#x2F;&#x2F; here! }).addTo(map); var railwayOverlay = L.tileLayer(&#x27;https:&#x2F;&#x2F;{s}.tiles.openrailwaymap.org&#x2F;standard&#x2F;{z}&#x2F;{x}&#x2F;{y}.png&#x27;, { attribution: &#x27;&#x27;, &#x2F;&#x2F; and here! }).addTo(map); </code></pre> [0]: <a href="https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;copyright" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.openstreetmap.org&#x2F;copyright</a><p>[1]: <a href="https:&#x2F;&#x2F;wiki.openstreetmap.org&#x2F;wiki&#x2F;OpenRailwayMap&#x2F;API" rel="nofollow noreferrer">https:&#x2F;&#x2F;wiki.openstreetmap.org&#x2F;wiki&#x2F;OpenRailwayMap&#x2F;API</a><p>[2]: <a href="https:&#x2F;&#x2F;drive.google.com&#x2F;file&#x2F;d&#x2F;1P7bhSE-N9iegI398QYDjKeVhnbS7-Ilk&#x2F;view" rel="nofollow noreferrer">https:&#x2F;&#x2F;drive.google.com&#x2F;file&#x2F;d&#x2F;1P7bhSE-N9iegI398QYDjKeVhnbS...</a> via <a href="https:&#x2F;&#x2F;carto.com&#x2F;legal" rel="nofollow noreferrer">https:&#x2F;&#x2F;carto.com&#x2F;legal</a>
评论 #38437525 未加载
elhospitalerover 1 year ago
Meanwhile, Europe: <a href="https:&#x2F;&#x2F;mobility.portal.geops.io&#x2F;world.geops.transit?layers=paerke,strassennamen,haltekanten,haltestellen,pois,world.geops.traviclive&amp;x=663559.8&amp;y=6305063.57&amp;z=6&amp;baselayer=world.geops.travic" rel="nofollow noreferrer">https:&#x2F;&#x2F;mobility.portal.geops.io&#x2F;world.geops.transit?layers=...</a>
评论 #38436064 未加载
Tiktaalikover 1 year ago
In contrast have a look at a snapshot of air travel the other day.<p><a href="https:&#x2F;&#x2F;x.com&#x2F;Rainmaker1973&#x2F;status&#x2F;1729195110888620057?s=20" rel="nofollow noreferrer">https:&#x2F;&#x2F;x.com&#x2F;Rainmaker1973&#x2F;status&#x2F;1729195110888620057?s=20</a><p>If we&#x27;re looking for some low hanging fruit around how to possibly lower CO2 emissions, well folks here it is.<p>The solutions to our climate problem have been staring us in the face since the 1900s.
评论 #38436168 未加载
评论 #38436144 未加载
评论 #38436056 未加载
评论 #38436071 未加载
gpvosover 1 year ago
Netherlands: <a href="https:&#x2F;&#x2F;treinposities.nl&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;treinposities.nl&#x2F;</a> , and for buses <a href="https:&#x2F;&#x2F;busposities.nl&#x2F;kaart" rel="nofollow noreferrer">https:&#x2F;&#x2F;busposities.nl&#x2F;kaart</a> (zoom in).
评论 #38440097 未加载
h1fraover 1 year ago
Looking at the speed of the trains is a bit depressing. USA had so much potential to built the best high-speed railway network...
评论 #38435491 未加载
评论 #38435588 未加载
评论 #38437761 未加载
评论 #38440690 未加载
评论 #38435424 未加载
评论 #38435528 未加载
评论 #38435208 未加载
afhammadover 1 year ago
Similar but for the London Undergroound:<p><a href="https:&#x2F;&#x2F;traintimes.org.uk&#x2F;map&#x2F;tube&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;traintimes.org.uk&#x2F;map&#x2F;tube&#x2F;</a> <a href="https:&#x2F;&#x2F;traintimes.org.uk&#x2F;map&#x2F;tube&#x2F;schematic&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;traintimes.org.uk&#x2F;map&#x2F;tube&#x2F;schematic&#x2F;</a>
评论 #38437141 未加载
the_mitsuhikoover 1 year ago
For Austria you can see them all here: <a href="https:&#x2F;&#x2F;anachb.vor.at&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;anachb.vor.at&#x2F;</a> (&quot;Kartenoptionen&quot; -&gt; &quot;Livemap&quot; -&gt; &quot;Alle einblenden&quot;). Even covers buses, subways, trams and local trains as well as public transport ships.
评论 #38437530 未加载
miki_tylerover 1 year ago
This is so cool! I just happen to post my own project about train maps in HN like an hour ago!<p>Coincidence...??? I think not!
评论 #38435639 未加载