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?
 
Back
Top