The NS Train Tracker is a 24/7 capable service that utilizes the NS Developer API to monitor and log real-time train data. It tracks material numbers, journeys, arrivals, departures, and disruptions, logging all this to files for safekeeping and archiving.
Tracks Active MaterialNumbers:
- Logs all active journeys for each material number every 15 minutes.
- Monitors and logs arrivals and departures for the following stations:
- Almere Centrum (alm)
- Amsterdam Centraal (asd)
- Den Haag Centraal (gvc)
- Zwolle (zl)
- Schiphol Airport (shl)
- Leiden Centraal (ledn)
- Leeuwarden (lwn)
- Journey Combination:
- Combines arrivals and departures into journeys when applicable.
- Tracks all active disruptions and keeps track of the following:
- Affected stations
- Reason for disruption
- Expected resolution time
- When disruptions are resolved, they are written to a CSV file.
- Java 17 or later
- JSON.jar
- NS API Key from the Developer portal
- Clone the repo
- Import into Eclipse or your IDE
- In the same folder as src and res create a file 'config.properties', and make this the contents: apiKey=YOUR_API_KEY_HERE
- The program will automatically save the tracking data in the res folder.