Skip to content

AshlieWernars/NSAPITracker

Repository files navigation

NS Train Tracker

Overview

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.

Features

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.

Requirements

To use:

  • 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.

Releases

No releases published

Languages