10 ms·
Live tracking of Amtrak trains
- mkempe 8y agoGreat to have access to that information. - Empire Builder near Minneapolis: 10h late. - Empire Builder near Kalispell: 6h late. Passenger train service in America needs to be returned to the private sector, without any interference by Congress. [added] Or you can watch the government fuck-up and quickly cast blame on the private sector. Private passenger services would have different, satisfying contracts with the rail owners; this is what companies do in the private sector some people apparently hate so much. There was a time when privately operated railroads were reliable in this country. Freight currently has deleterious right of way because this is what bureaucrats have agreed to. Imagine these bureaucrats did something similar on the highways you all love so much, making passenger vehicles wait on the side to let trucks move a little faster.
- vertex-four 8y agoThe issue isn’t who runs it, it’s that the trains don’t have tracks to reasonably run on. Elsewhere, when passenger trains are delayed, every effort is made to get them back on time again - in America, they’re left for hours in a siding while freight trains go by.
- JKCalhoun 8y agoYep, freight has right of way.
- gok 8y agoNo. Legally, Amtrak always has priority over freight. There are cases where host railroads are badly behaved but more often the problem is that Amtrak is poorly operated.
- jessaustin 8y agoRightly so. Rail freight is important in USA, while rail travel is not. We already have too many semi trucks on the roads; it would be foolish to force more freight onto the highways to pander to some dream about rail travel.
- ghaff 8y agoI wouldn't worry too much about that. My understanding is that rail freight is about 10% the cost of trucking it.
- rayiner 8y agoThe northeast regional trains are routinely 30-50 minutes late, and Amtrak owns those tracks and has priority on them.
- michaelleslie 8y agoAhh, the classic, "We've defunded and gutted this government program. Look! Government doesn't work!" that the American right traffics in. The private sector is the reason for these delays. http://blog.amtrak.com/2015/02/message-amtrak-regarding-time-performance/ http://blog.amtrak.com/2015/02/message-amtrak-regarding-time...
- kevin_thibedeau 8y agoExcept that Amtrack is consistently late on the NEC and other regional lines that they have priority on. Really annoying when you are on a train waiting to pull out of a station and can't go because a late Amtrack has priority.
- michaelleslie 8y agoThat's a good point. I know Penn is a major bottleneck (we have Christie to thank for that after killing ARC), and there's the added problem of delays conflicting with Metro North/NJT schedules. We need infrastructure investment in dense corridors if we're to get anywhere remotely near European or Asian standards.
- rayiner 8y agoIt's not clear to me we even have "dense corridors" like in Europe. I was in Munich, and driving in from the airport what struck me is that the city just ends. The city is 1.5 million people. Then there is another million or so people in the metro area, and 30 minutes outside of downtown its farms. Contrast Philadelphia, which is at the center of the U.S. "northeast megalopolis." It's also 1.5 million people, but there are another 4.5 million people in the surrounding sprawl. You can go an hour outside Philly in almost any direction and still be in suburban sprawl. That totally changes the transit equation. You build high-speed rail to Munich, and you're serving more than half the population of the metro area. You build high-speed rail to Philly, and you serve just a quarter of the population (while the other three quarters is stuck paying for something they have to drive to get to anyway). This is true at multiple levels of scale. Compare Ulm, Germany to Richmond, VA. Both are about 100-200k people. Aside from a few appendages, you hit farms 2-3 miles outside Ulm in most directions. Richmond, by contrast, is surrounded for 8-10 miles in all directions by suburbs, which have another million people. When it comes to voting for things like transit or train service, the people in the city that might benefit from it are totally outnumbered by all the people in the suburbs who can't.
- jccalhoun 8y agoApparently that track is undergoing work https://www.amtrak.com/alert/empire-builder-track-work-delays.html https://www.amtrak.com/alert/empire-builder-track-work-delay... I can't imagine that a private company would bother running a passenger route from chicago to the pacific northwest.
- kennydude 8y agoHahaha. Have you seen how it works in England? Yet again the East Coast route has returned to public hands because the private operator felt "it wasn't profitable enough"
- Fukkaudeku 8y agoLNER (the public operator that replaced it) is pretty good, too; my train from King's Cross to Edinburgh was only 6 minutes late to arrive (very little jitter for a 4.5hr service) and the service onboard was great too.
- mercutio2 8y agoPrivately operated passenger railroads were (somewhat) more reliable, but not profitable, which is why Amtrak exists.
- mkempe 8y agoHave you inquired into why they became unprofitable? Have you considered the massive government investments into and subsidies for the two other modes of transportation following WW II?
- compuguy 8y agoPassenger trains in the US died off in the late 1960s because of automobiles and the Interstate Highway System (don't forget airplanes).
- AnimalMuppet 8y agoI don't think they were ever profitable. I think they became unbearably more unprofitable after WWII, but I think they were unprofitable before that. And, when you talk about government investments into the two other modes of transportation, I presume you mean air and highways. You forgot waterways - also created/improved with government investment.
- ucaetano 8y agoWow, this is depressing. For comparison, here's Germany's: http://www.apps-bahn.de/bin/livemap/query-livemap.exe/dn?L=vs_livefahrplan&livemap=yes http://www.apps-bahn.de/bin/livemap/query-livemap.exe/dn?L=v... (might need to zoom in to see more trains)
- SilasX 8y agoI don't know, the /query-livemap.exe/ bit is also a little depressing...
- crooked-v 8y agoAt least it's not a JS script being used as a CGI executable.
- rayiner 8y agoNot really. In terms of density, the only part of the U.S. comparable to Germany (600 people per square mile) is the northeast megalopolis (900 people per square mile). Also, your map includes regional trains, while the Amtrak map is just inter-city. This is a more appropriate point of comparison: https://4194e6d9-a-62cb3a1a-s-sites.googlegroups.com/site/northeastrailmap/Northeast_Rail_Map_2014-12-29.png?attachauth=ANoY7cqyBCSOnE9TzEzq6kJ4XdUvKVREN65Htw55NvMFavebEqmPl9KmEjUG9dCN69_xhWDMSOCODqRQfzshYvnO02A0wYtd1IwoPa0vSvBapIojSvefH_n_ceGS6LIeHc91nhDdSIwLglIlk3lNMmamt3eJuN6lW0iYDGCx3jbo-mcgKpowYEYXYvRkanYFSiDoqoeJmbfaRkrdN6fSFhLbxqaxaBMeTt1GBhAHmX2TBg-fiOyCVMHh7rFb_jz7Y5cEjDFxQuMU&attredirects=0 https://4194e6d9-a-62cb3a1a-s-sites.googlegroups.com/site/no.... (Note that the middle of Pennsylvania, or upstate New York, or almost all of Virginia are not part of the northeast megalopolis: http://statchatva.org/files/2015/11/Northeast-Corridor2-991x1024.jpg http://statchatva.org/files/2015/11/Northeast-Corridor2-991x...).
- ucaetano 8y ago> the only part of the U.S. comparable to Germany (600 people per square mile) is the northeast megalopolis (900 people per square mile) Which has >50M people, 2/3 of the population of Germany. In that comparison, that region should have then 2/3 of the rail network of Germany. It has 1 medium-speed rail line. > while the Amtrak map is just inter-city The Capitol Corridor, for example, is comparable to a Regio train in Germany (but slower, shittier, etc.).
- reustle 8y agoI've been trying to crack the encryption on this for a while. I want to make a free public train status api (I built amtrak.io). If anyone would like to help improve public open data around Amtrak, please contact me. Been also digging into making a PDF parser for their very complicated schedule files, not that they follow it anyway :)
- thetwentyone 8y agoI don't have the capacity to do this, but I tried a few years ago: I no longer am in a situation where I need tracking, but a couple of years ago I had the need for tracking my daily commuter train. I had to resort to scraping the website to find the status. If it was late, I had a push notification sent to my phone (a combination of a free app engine deployment and pushbullet). I tried to get integration via Tasker to set my alarm back if the train was more than [x] minutes, but never got to that point. I really hope that you make some progress on this, though I wish you didn't have to and Amtrak shared the data.
- jonknee 8y agoA comment in the source code seems to describe what you need to do: MasterSegment is the length of the string at the end of the encrypted data that contains the secret key To decrypt - we do the following 1. Take masterSegment (88) length - from the right of the data - this has the private key 2. Everything from 0 to the end - master segment is the raw data - that needs to be decrypted 3. Decrypt the 88 characters using the public key - that will give you a pipe separated string of the private key (random guid from MDS) and a time stamp (to scramble it) 4. Now use the private key and decrypt the data stored from step 2. 5. Parse the decrypted data - and rejoice 6. KSUE -means key issue 7. __$$_jmd - the public key that we obtain __$_s1 : variable name for the Security object in the Helper.js file - that file has the calls to actually decrypt the data.
- iancarroll 8y agoThis is insane. How much time did they put in to this pointless obfuscation, and then why would they go and document it all?
- JKCalhoun 8y agoMakes me want to hop on the Zephyr. Anything like this for Canadian rail? Love to ride from coast to coast up north.
- pm24601 8y agoYou should - very beautiful scenery. Including canyons with no roads through them.
- yellowcherry 8y agoYay! An official version. This site has been doing it "unofficially" for years, but I'm sure even they will be happy there's a real Amtak version now. https://asm.transitdocs.com/ https://asm.transitdocs.com/
- geuis 8y agoTwo fingers to drag on mobile? Who built this thing?
- edhu2017 8y agosomebody with conjoined fingers!
- softwaredoug 8y agoYou’ll pry Dixielands Amtrak tracker from my cold, dead hands Amtrak!! http://www.dixielandsoftware.net/Amtrak/status/StatusMaps/ http://www.dixielandsoftware.net/Amtrak/status/StatusMaps/
- apple4ever 8y agoYes yes! I love that site. I actually use a simple Python script to parse the data on that site and send me a notification every morning and afternoon of how on time my train is. Its sad I have to do that. Amtrak should have that system already (they sort of do- but only for trains that are 20 minutes late).
- gok 8y agoFirst train I tapped was 9 hours late. So yeah that’s definitely Amtrak!
- lqet 8y agoWe did something similar on a global scale a few years ago (http://tracker.geops.de/?z=9&s=1&x=901854.6472&y=5948883.6866&l=transport http://tracker.geops.de/?z=9&s=1&x=901854.6472&y=5948883.686...). Unfortunately, it is still very difficult to obtain official real-time data (even simple delay information).
- eurticket 8y agoI've always wanted something like this for the buses in my area.
- exikyut 8y agoHuh, the "carto" service this calls out to seems a bit interesting. Surely someone else has noticed this... Specifically the part where https://amtk.carto.com/api/v1/map?stat_tag=API&config=%7B%22version%22%3A%221.3.0%22%2C%22stat_tag%22%3A%22API%22%2C%22layers%22%3A%5B%7B%22type%22%3A%22cartodb%22%2C%22options%22%3A%7B%22sql%22%3A%22SELECT%20*%20FROM%20national_route_shape_v16%22%2C%22cartocss%22%3A%22%23layer%20%7Bline-color%3A%20%23FF031D%3Bline-width%3A%202%3B%7D%22%2C%22cartocss_version%22%3A%222.1.0%22%7D%7D%5D%7D&callback=_cdbc_2486699862_1 https://amtk.carto.com/api/v1/map?stat_tag=API&config=%7B%22... is a URL-encoded request for the following encoded JSON: https://amtk.carto.com/api/v1/map?stat_tag=API&config={ "version":"1.3.0", "stat_tag":"API", "layers": [{ "type":"cartodb", "options":{ "sql": "SELECT * FROM national_route_shape_v16", "cartocss": "#layer {line-color: #FF031D;line-width: 2;}", "cartocss_version": "2.1.0" } }] } In case you don't see it: SELECT * FROM ... It does seem to be going through some mangling and parsing however. Carto's website doesn't look like it's from 1994, so my guess is that Someone™ read a book on "rapid-turnaround web development" upside down a few years ago, and now the current devs have to live with some poor decisions (raw SQL as form input) for the sake of legacy compatibility. This being said, the error messages are quite fun: > SELECT version(); {"errors":["Postgis Plugin: ERROR: column \"the_geom_webmercator\" does not exist\nLINE 1: ...ECT ST_AsTWKB(ST_Simplify(ST_RemoveRepeatedPoints(\"the_geom_...\n ^\nin executeQuery Full sql was: 'SELECT ST_AsTWKB(ST_Simplify(ST_RemoveRepeatedPoints(\"the_geom_webmercator\",1e-05),1e-05,true),5) AS geom FROM (SELECT version()) as cdbq WHERE \"the_geom_webmercator\" && ST_SetSRID('BOX3D(-20037508.3 20037508.25881302,-20037508.25881302 20037508.3)'::box3d, 3857)'\n"],"errors_with_context":[{"type":"layer","message":"Postgis Plugin: ERROR: column \"the_geom_webmercator\" does not exist\nLINE 1: ...ECT ST_AsTWKB(ST_Simplify(ST_RemoveRepeatedPoints(\"the_geom_...\n ^\nin executeQuery Full sql was: 'SELECT ST_AsTWKB(ST_Simplify(ST_RemoveRepeatedPoints(\"the_geom_webmercator\",1e-05),1e-05,true),5) AS geom FROM (SELECT version()) as cdbq WHERE \"the_geom_webmercator\" && ST_SetSRID('BOX3D(-20037508.3 20037508.25881302,-20037508.25881302 20037508.3)'::box3d, 3857)'\n","subtype":"query","layer":{"id":"layer0","index":0,"type":"mapnik"}}]} The ">" prompt above is from this 4-second hacky script to make a shell: tput reset; while true; do read -p '> ' x; echo '{"version":"1.3.0","stat_tag":"API","layers":[{"type":"cartodb","options":{"sql":"'"$x"'","cartocss":"#layer {line-color: #FF031D;line-width: 2;}","cartocss_version":"2.1.0"}}]}' | curl "https://amtk.carto.com/api/v1/map?stat_tag=API&config=$(php -r 'print urlencode(fgets(STDIN));')"; echo; done
- smokeyBread 8y agoAre there seriously some US states with no trains? e.g. wyoming, south dakota Or is Amtrak just one company, and there are other train companies offering different routes? It just seems like such a tiny number of routes (especially compared to Europe train routes)
- mercutio2 8y agoThe USA is much, much, much less dense than Europe. Anyway, yes, there are no cross country passenger trains in many states, and even for the states that have them they exist as congressional pork, at this point. It is much faster and cheaper to drive in the US (the train max speeds are slower than the highways), and slightly cheaper and vastly faster to fly. Only in dense regions, like California and the northeast, are inter-urban trains a meaningful thing in the USA. Freight trains, on the other hand, are a much bigger deal in the USA than in Europe.