Join Nostr
2025-04-13 17:44:55 UTC

dave on Nostr: for fun I looked into how to process amtrak train location data. turns out they have ...

for fun I looked into how to process amtrak train location data. turns out they have no truly public api, but there are public endpoints with obfuscated data. fortunately, people have reverse engineered it (https://github.com/mgwalker/amtrak-api) which is why there are unofficial trackers out there. I translated some of the code into scheme using the industria/hashing libraries for hmac-sha-1 hashing and aes-cbc encryption. didn't see a readily available pbkdf2 scheme library so I rolled my own. took some fiddling but it's working!

here's what a snapshot of an acela from dc to boston looks like: https://gist.github.com/davexunit/5210776b7a47c39021cd7059ef0e1340