Bucket Chart?

Amtrak Unlimited Discussion Forum

Help Support Amtrak Unlimited Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Ok, have a look at: https://api.railforless.us/buckets

There are a few gaps in the data but it doesn't look bad for my first attempt.
This is a great start! A couple of things

1) I like how the rail fare and accommodation fare are separated, but it might by nice to have a line that combines the two (i.e. having a line for "roomette" "roometteRail" and "RoometteTotal" etc.). I say this as the total of the accommodation + rail fare is ultimately what you is shown on the booking page and is what you have to pay Amtrak when buying the ticket!

2) This list seems to only show the number of buckets that are available at the current time (i.e. only 6 roomette buckets for the SM, even though we know that there are 8 buckets). It would be nice to include fares that we know exist but might not be available right now (at least for the sleeper fares). This will especially be helpful when the summer comes and low bucket fares become more scarce. Hopefully that makes sense. I understand that might be hard to code in though.

I'm sure you'll format the data too eventually. Looking forward to this new resource though!
 
Don’t forget about the auto train!
On the list!
1) I like how the rail fare and accommodation fare are separated, but it might by nice to have a line that combines the two (i.e. having a line for "roomette" "roometteRail" and "RoometteTotal" etc.).
This is just the raw API data. Once this is done it will be cleanly formatted on RailForLess, including totals. :)

This list seems to only show the number of buckets that are available at the current time (i.e. only 6 roomette buckets for the SM, even though we know that there are 8 buckets).
Yes. This is more apparent for lesser used routes. Right now I am drawing from caches searches, but honestly think it would be better to rewrite to fetch data from Amtrak directly.
 
On the list!

This is just the raw API data. Once this is done it will be cleanly formatted on RailForLess, including totals. :)


Yes. This is more apparent for lesser used routes. Right now I am drawing from caches searches, but honestly think it would be better to rewrite to fetch data from Amtrak directly.
Can’t wait to see what becomes of this!
 
Here's what I am thinking right now, in pseudocode:

Code:
for each station pair:
    queue amtrak requests, round trip, for the next (11 * 30) = 330 days
    get amtrak data
    queue requests to fetch bedrooms and family room prices
    
    for each trip response where trainId = input train id:
        extract fares and store in lists per accommodation type
        
    find unique values in each list and sort

My question is how often Amtrak changes buckets. If I fetch 11 months of data, I could end up with data from multiple buckets. Or do they all change at once such that future buckets are all the same?
 
Here's what I am thinking right now, in pseudocode:

Code:
for each station pair:
    queue amtrak requests, round trip, for the next (11 * 30) = 330 days
    get amtrak data
    queue requests to fetch bedrooms and family room prices
 
    for each trip response where trainId = input train id:
        extract fares and store in lists per accommodation type
  
    find unique values in each list and sort

My question is how often Amtrak changes buckets. If I fetch 11 months of data, I could end up with data from multiple buckets. Or do they all change at once such that future buckets are all the same?
They all change at once. The lowest bucket now is the same as the lowest bucket if you’re booking a ticket that’s departing 11 months from now.

They used to only change the buckets once every year or two, but now it seems like they adjust them every 6 months or so. It is pretty easy to notice when they change as all the buckets will be a different price than they were before.
 
Last edited:
I am not certain why so many coach buckets appeared, or how some are as low as $64 (the lowest I see now is $100).
Don't really know why some trains have as many as 16 Coach buckets listed by Amtrak, but there's no reason why there couldn't be. Maybe the extra ones are spares and may or may not ever be offered.

As far as the two rail fare charges all I can say is the higher one is the one that seems to be added to get the total fare for one adult. No idea about the lower one, which is about 4-5% less.

Nevertheless, your initial query has all the info needed to figure out the range of fares for any train. Here's the CZ's info plucked from your long list:

Mr. t's data.jpg
 
As far as the two rail fare charges all I can say is the higher one is the one that seems to be added to get the total fare for one adult. No idea about the lower one, which is about 4-5% less.

View attachment 38578
It’s not always the higher fare rail fare. All of the CZ fares I see are based off of the lower rail fare price ($277) rather than the higher one ($290). I.e the lowest roomette bucket available for the CZ is $616 which is 339+277
 
I'm surprised some nefarious Amtrak bean counter hasn't dreamt up a system in which each sleeper accommodation simply has an upper and lower limit and what's offered could be any of the whole dollar amounts within that range. Doing so would give a Roomette on the SWC a total of 905 buckets!
 
I'm surprised some nefarious Amtrak bean counter hasn't dreamt up a system in which each sleeper accommodation simply has an upper and lower limit and what's offered could be any of the whole dollar amounts within that range. Doing so would give a Roomette on the SWC a total of 905 buckets!
Shhhh..........😂
 
I'm surprised some nefarious Amtrak bean counter hasn't dreamt up a system in which each sleeper accommodation simply has an upper and lower limit and what's offered could be any of the whole dollar amounts within that range. Doing so would give a Roomette on the SWC a total of 905 buckets!
ARROW almost certainly couldn't handle that. One thing to be thankful for that they're still using that creaking antique.
 
And maybe in the grand scheme of things, all that need be known is high and low bucket as well as the rail fare charges for each accommodation, kinda like this:

hi - lo BUCKET CHARET.jpg
Or something like this might do just as well:

SWC & TE Rail Fare = $277 or $290
Coach = $64 to $394
Roomette = $339 to $1192
Bedroom = $815 to $2933
Fam. Rm = $945 to $2324

If someone really wants to know the missing accommodation charges, just find the 7th root of the ratio of the high to low values for each type of sleeper and do some multiplications starting with the low value (assuming a total of 8 buckets).
 
Last edited:
If someone really wants to know the missing accommodation charges, just find the 7th root of the ratio of the high to low values for each type of sleeper and do some multiplications starting with the low value (assuming a total of 8 buckets).
Once I finish my rewrite there should be no missing buckets, but I need to rewrite part of my scraping engine to even make this manageable. :p (the core issue is Cloudflare's 1000 subrequest limit per request. There are ways around this but it requires me to rethink my current approach).

I'm toying with the idea of a highly optimized algorithm that knows there should be 8 buckets and only scrapes until the 8 buckets are known, but this might leave out extreme coach buckets since the number of coach buckets seems to be unknown.
 
FWIW, I quit looking for and posting all the coach buckets in Dec 2023 and just posted the railfare in the coach column. I don't recall any grumbling about that change. Soooo-o-o-.....

.....maybe there's no real need for all (or any) of the coach buckets, just the railfare. The big bucks are in the sleepers anyway! :)

This would cure the coach bucket problem, wouldn't it?
 
FWIW, I quit looking for and posting all the coach buckets in Dec 2023 and just posted the railfare in the coach column. I don't recall any grumbling about that change. Soooo-o-o-.....

.....maybe there's no real need for all (or any) of the coach buckets, just the railfare. The big bucks are in the sleepers anyway! :)

This would cure the coach bucket problem, wouldn't it?
The difference is that you were doing it by hand, versus @Mr.Technician who runs an algorithm. If he is already getting the coach fare data when he runs his search, might as well use it.

After seeing one of the first outputs last week, I was personally surprised how low some of the coach fares have gotten. Might be interesting to track.
 
.....maybe there's no real need for all (or any) of the coach buckets, just the railfare. The big bucks are in the sleepers anyway! :)
While this is true, I might as well display what coach data I do have.

After seeing one of the first outputs last week, I was personally surprised how low some of the coach fares have gotten. Might be interesting to track.
I’d take the $64 price with a grain of salt. That came from this (and presumably others like it) search: https://railforless.us/cached/CHI-EMY_1731631550

I have not been able to reproduce it.
 
Back
Top