Rail Snapshot
{{ summaryTitle }}
{{ summarySubtitle }}
Platform {{ summaryPlatform }} {{ summaryDelayBadge }} {{ summaryDirection }} Operator {{ selectedService.operator }}
{{ statusMessage }}
Ahead min Keep rows
Now min
Every sec
# Service Destination {{ boardLabel === 'Arrivals' ? 'Arrives' : 'Departs' }} Expected Platform Delay Copy
{{ idx + 1 }}
{{ svc.name }}
{{ svc.operator }}
{{ svc.destination || '—' }}
{{ svc.directionText }}
{{ svc.plannedLabel }} {{ svc.expectedLabel }} {{ svc.platform || '—' }} {{ svc.delayLabel }}
Select a service from the board to view its stops and delays.
This service did not return stop details. Try another train or refresh.
# Stop Arrives Departs Platform Delay Copy
{{ idx + 1 }}
{{ stop.name }}
{{ stop.status }}
{{ stop.arrivalLabel }} {{ stop.departureLabel }} {{ stop.platform || '—' }} {{ stop.delayLabel }}
Select a service to render the delay chart.
No delay data was returned for this service. Try another selection.

                    
Enter a station and fetch the live board to track rail services. The tool uses the Swiss public transport API and works best with well-known stations.
:

Introduction:

Rail departure and arrival boards are snapshot lists of what is expected to leave or reach a station next, and they help you judge platforms, connections, and disruption quickly. When you need a live Swiss train departure board for a busy hub, this tracker pulls the latest board and surfaces timing changes that affect real decisions. Type a station name and you receive a focused list within a chosen time window.

You can treat the board as a practical checklist, first scanning for the service you care about and then checking destination, platform, and expected time. Optional filters let you narrow the list to a matching destination string or a specific service code so the useful rows rise to the top. For example, if you are meeting someone at Geneva Airport, filtering toward that destination helps you spot the right train even when many lines share the same station.

Selecting a service turns the station snapshot into a route view, where each stop shows whether it is on time, late, early, or cancelled. A simple delay chart then makes it easier to see where minutes were gained or lost along the run. Delays are estimates based on the latest expected time and they can change from one refresh to the next, especially during disruptions. Use the result as guidance, and confirm critical details with operator announcements when you are making a tight connection.

For cleaner comparisons, keep your station and look ahead window consistent, and use a modest refresh interval when you want to monitor changes. Choose this tool when you need a station focused view with platform context, and switch to a journey planner when you need end to end routing. Only enter station and filter details, and avoid sharing personal travel notes when you copy or export results.

Live boards reflect the most recent prediction, not a guarantee, so double check when a missed connection would be costly.

Technical Details:

The core measurement is time drift between what the timetable planned and what the live prognosis expects, expressed as whole minutes of delay. Each service carries a planned timestamp and, when available, an expected timestamp for the same event, either an arrival or a departure depending on the board you request.

The tool computes an integer delay by subtracting planned time from expected time and rounding to the nearest minute. The same planned versus expected comparison is repeated for intermediate stops when a service returns stop details, which enables a delay by stop view.

Results are interpreted with simple bands that match the way the tool highlights services, including on time, minor delay, larger delay, early estimates, and cancellations. Values near the boundary can flip with small prediction updates, so treat borderline cases as signals to recheck soon.

For consistency, all displayed times are formatted in the Europe/Zurich time zone, and the board window is anchored to the current time plus any offset you apply. Comparisons are most meaningful when you keep the same station, the same window length, and a similar refresh cadence.

Core calculation

d min = round ( t expected - t planned 60000 )

Here d_min is the delay in minutes, and 60000 converts milliseconds to minutes. When a live expected time is missing, the tool falls back to the planned time, which yields a delay of 0.

Symbols and units

Symbols, meanings, units, and sources
Symbol Meaning Unit/Datatype Source
t_planned Planned arrival or departure timestamp used as the baseline. Milliseconds since epoch (Number) Input
t_expected Expected timestamp from live prognosis, when provided. Milliseconds since epoch (Number or null) Input
d_min Delay rounded to whole minutes, positive late, negative early. Integer minutes Derived
bestTime Time used for sorting and window filtering, expected if present else planned. Date Derived
W Lookahead window length from the anchor time. Minutes (Integer) Input

Worked example for a departure where times are shown to the minute. Internally the tool uses timestamps, but subtracting minutes since midnight gives the same delay.

t planned = 10 × 60 + 12 = 612
t expected = 10 × 60 + 13 = 613
d min = round ( 613 - 612 ) = 1

Interpretation: d_min = 1 means the expected departure is about one minute later than planned.

Interpretation bands

Delay bands and what they imply
Threshold Band Lower Bound Upper Bound Interpretation Action Cue
Cancelled n/a n/a A cancellation flag overrides the numeric delay. Recheck alternatives and announcements.
On time 0 0 Expected matches planned to the nearest minute. Proceed as usual, keep an eye on updates.
Minor delay 1 5 Small lateness that can often be absorbed in a trip. Check connections if your buffer is small.
Larger delay 6 n/a More significant lateness flagged for attention. Plan for missed connections and platform changes.
Early estimate n/a -1 Expected timestamp is earlier than planned. Use as a hint, confirm at the station.

The band split above reflects the tool’s internal highlight rule where delays greater than 5 minutes are flagged more strongly than smaller positive delays.

Parameters you can change

Configurable parameters, types, ranges, and notes
Parameter Meaning Unit/Datatype Typical Range Sensitivity Notes
Station query The station name used for lookup. Text Required High Blank input stops the fetch and shows an error.
Board type Whether to fetch departures or arrivals. Enum 2 values High Switches which timestamp fields are used for times and delays.
Destination filter Optional text match against the destination. Text Optional Medium Case insensitive substring match.
Service or line filter Optional match against service name or number. Text Optional Medium Matches against a combined service label.
Lookahead window How far ahead to consider services from the anchor time. Minutes 10 to 360 High Also clamps to safe bounds if an invalid value is provided.
Result limit Maximum number of services after filtering. Rows 5 to 40 Medium The upstream fetch asks for at least 20 items before filtering.
Anchor offset Shift the anchor time relative to now. Minutes -720 to 720 Medium Useful for looking ahead without changing your system clock.
Rail only Limit transport modes to trains only. Boolean 0 or 1 Medium When off, the mode list may include buses, trams, and ships.
Auto refresh Poll the board repeatedly. Boolean 0 or 1 High Only runs when a non empty results list is present.
Refresh interval Polling cadence when auto refresh is enabled. Seconds 15 to 300 High Short intervals increase load and may hit rate limits.

Key constants from the logic

Constants and fixed thresholds used by the tool
Constant Value Unit Source Notes
Delay warning threshold 5 min UI classification Delays greater than this are highlighted more strongly.
Early window grace 30 min Filtering Heads-up Services up to 30 minutes before anchor can still be included.
Minimum upstream limit 20 rows Fetch request Requests at least 20 items before local filtering and slicing.
Chart minimum axis span 10 min Delay chart Chart scale is symmetric around zero and never smaller than ±10 minutes.
Chart axis rounding step 5 min Delay chart Axis max is rounded up to a multiple of 5 minutes.
Image export pixel ratio 2 × Chart download Improves sharpness for PNG output.
JPEG quality 0.92 ratio Chart download Used when converting the chart image to JPEG.

Units, precision, and rounding policy

  • Times are formatted in Europe/Zurich using a 24 hour clock and shown to minutes.
  • Delays are whole minutes and are computed by rounding to the nearest integer with Math.round.
  • Heads-up Tie handling follows JavaScript rules, where -0.5 rounds to 0 and 0.5 rounds to 1.
  • If either timestamp is missing or invalid, the computed delay becomes 0.

Validation and bounds

Input validation rules and bounds
Field Type Min Max Step/Pattern Error Text
Station query Text n/a n/a Must be non empty after trimming Enter a station name to look up the live board.
Destination filter Text n/a n/a Optional substring match No explicit error
Service or line filter Text n/a n/a Optional substring match No explicit error
Board type Enum n/a n/a departures or arrivals No explicit error
Lookahead window Number 10 360 Step 5 Clamped to bounds
Result limit Number 5 40 Step 1 Clamped to bounds
Anchor offset Number -720 720 Step 5 Clamped to bounds
Auto refresh Boolean 0 1 Switch No explicit error
Refresh interval Number 15 300 Step 5 Clamped to bounds
Station lookup Network n/a n/a Retries with a simplified query Station lookup failed. Please try again. / No matching station found.
Board fetch Network n/a n/a Uses anchor time and filters Could not load the board. The public API may be busy.

Inputs, outputs, and exports

The tool can export summaries for sharing or auditing, including Comma Separated Values (CSV), Office Open XML document (DOCX), and JavaScript Object Notation (JSON). For file names, station and service text is normalized with Unicode Normalization Form Compatibility Decomposition (NFKD), diacritics are stripped, and long labels are truncated.

Input and output formats supported by the tool
Input Accepted Families Output Encoding/Precision Rounding
Station query and options Text plus numeric bounds Board rows Times to minutes, delays in minutes Math.round to whole minutes
Selected service Stop list when available Route rows Arrival and departure labels to minutes Math.round to whole minutes
Board table Derived rows CSV and DOCX Text values as displayed Already rounded in the UI
Route table Derived rows CSV and DOCX Text values as displayed Already rounded in the UI
Delay series Stops with numeric delays Chart images and chart CSV PNG or converted to WebP or JPEG, chart CSV has stop and delay Delays are integers
Current state Query, station, services JSON export Pretty printed, anchor and update timestamps in ISO 8601 n/a

Networking and storage behavior

Live data is fetched using the browser Fetch interface against a public Application Programming Interface (API) for Swiss transport. Station lookup uses a locations endpoint and the board uses a stationboard endpoint, both requested with query parameters for filtering.

https://transport.opendata.ch/v1/locations
https://transport.opendata.ch/v1/stationboard
  • Requests are unauthenticated and rely on standard HTTP status codes for success or failure.
  • The board request includes a datetime parameter formatted in Europe/Zurich as YYYY-MM-DD HH:MM.
  • When rail only is enabled, the transport mode list is restricted to train categories, otherwise additional modes are included.
  • No persistent storage calls are present in this package, and results live in memory for the current page session.

Performance, determinism, and diagnostics

  • Filtering and sorting runs in approximately O(n log n) for n services returned by the feed.
  • Stop level processing is linear in the number of returned stops.
  • Auto refresh uses a timer and re issues the same stationboard request at the chosen cadence.
  • An audit mode exists for deterministic chart rendering without network calls when enabled by configuration.

Security considerations

  • Station and filter text is URL encoded before being sent in network requests.
  • Stop names and times can appear inside chart tooltips rendered as HTML, so rely on trusted data sources.
  • Clipboard operations and file downloads depend on browser permissions and may be blocked in restricted contexts.
  • Copied exports can contain travel patterns, so share them thoughtfully.

Assumptions and limitations

  • Displayed times are formatted in Europe/Zurich regardless of the device time zone.
  • If an expected timestamp is missing, the tool treats the service as on time by setting delay to 0.
  • A cancellation flag overrides numeric delay and is surfaced as the primary status.
  • Destination filtering is case insensitive and matches partial text.
  • Service filtering matches against the combined service label and number as plain text.
  • Heads-up Filtering allows services up to 30 min before the anchor time to account for feed timing.
  • Route stop details are optional and may be absent for some services.
  • The delay chart only includes stops that include a numeric delay value.
  • Auto refresh only runs when there are results to refresh, and it stops when the component is removed.
  • Exports reflect the currently displayed values and not a separately stored history.

Edge cases and error sources

  • Empty station input triggers an immediate validation error and no network request.
  • Station lookup can return no matches, leading to a clear no station found state.
  • Network failures or non success responses produce user facing error messages.
  • Unexpected timestamp formats can fail Date parsing, resulting in missing times and a delay of 0.
  • Daylight saving time transitions can shift apparent times near the changeover.
  • Some station results may lack an identifier, which forces name based requests.
  • Stop lists can be empty, which disables route tables and delay charts for that service.
  • Heads-up Delays near the half minute boundary can flip because minutes are rounded, not floored.
  • Negative tie rounding can produce 0 from a small negative fraction of a minute.
  • Very long stop names may be truncated in chart labels to avoid overlap.
  • Chart rendering can be skipped when the chart container has zero size, such as before a tab becomes visible.
  • Clipboard writes can fail when the browser blocks programmatic access.

Standards and references

Time and rounding behavior follows the ECMAScript specification for Date and Math.round, and time zone formatting follows ECMA 402 Internationalization APIs. Network request semantics align with the Fetch standard, and exported timestamps use ISO 8601 string form.

Privacy and compliance

Station queries and board requests are sent from your browser to the public transport data service, and this tool does not persist results beyond the current session.

Step-by-Step Guide:

Track station board changes by anchoring a time window, filtering to what matters, and then interpreting delay and cancellation signals before you commit to a platform.

  1. Enter a Station name and fetch the live board.
  2. Choose Departures or Arrivals based on what you are monitoring.
  3. Set a Lookahead window and a Result limit to keep the list manageable.
  4. Optionally add a destination text filter or a service code to focus the board.
  5. Toggle rail only if you want to exclude non rail modes.
  6. Select a service to view its stop sequence and examine delay changes by stop.
  7. If you enable auto refresh, pick a reasonable interval and watch for rapid changes. Heads-up
  8. Copy or download the current view when you need to share or archive the snapshot.

Example workflow: search for Zurich HB, choose departures, set a 90 minute window, and filter destination to Basel. Then pick the matching service and confirm platform and delay before heading to the track.

Outcome: you get a short list of relevant trains with clear timing status, plus a stop level view when the feed provides it.

  • If you are comparing days, keep the same window size and filters.
  • If you are tracking a tight transfer, refresh shortly before the connection point.
  • If route details are missing, try a different service or refresh the board.

FAQ:

Is my data stored?

The tool does not write to localStorage or sessionStorage in this package, and it keeps results in memory for the current page session. Live queries are sent to the public transport data service to fetch station and board data. If you copy or download exports, they are saved on your device.

How accurate are delays?

Delay minutes are computed from planned and expected timestamps and rounded to the nearest minute, so small fluctuations can appear between refreshes. If the feed does not provide an expected time, the tool falls back to planned time and shows on time. Always confirm critical journeys with station displays and operator announcements.

Delays are guidance, not a guarantee.
What time format is used?

Times are displayed in Europe/Zurich using a 24 hour clock with hour and minute precision. Delays are integer minutes and can be positive, zero, or negative. Exports mirror the displayed values, and JSON includes ISO 8601 timestamps for the anchor time and last update time.

Does it work without network?

The live station board requires network access because it fetches current station and timetable data. If the live feed is unavailable, you can still review the interface and, in some configurations, run a built in audit mode that uses a sample dataset without network calls.

Is there any cost?

The app code contains no billing, subscriptions, or sign in requirements. Any terms of use or licensing are determined by the site or product that hosts the tool and the upstream data provider policies.

Check your deployment notice if one is provided.
How do I filter destination?

Enter a partial destination name and the tool keeps services whose destination text includes that string, ignoring letter case. This is useful when several platforms serve different branches and you only care about one direction.

Why can delays be negative?

A negative delay means the expected timestamp is earlier than the planned timestamp, after rounding to whole minutes. This can occur when a service regains time or when predictions are updated. Treat it as a hint to recheck, not as a promise of early departure.

What is borderline delay?

Borderline usually means the value is near a band boundary, such as around five minutes where highlighting changes. Since the tool rounds to whole minutes, small timestamp shifts can move a service from one band to another. If you see a borderline case, refresh once more before you change plans.

Troubleshooting:

  • No matching station found. Try a simpler station name and remove extra words.
  • Board is empty. Increase the lookahead window or switch between departures and arrivals.
  • Filters remove everything. Clear destination and service filters, then reapply one at a time.
  • Route view shows no stops. Some services do not return stop details, select a different service.
  • Delay chart is blank. The selected service may have no delay values per stop, try another service.
  • Copy actions do nothing. Clipboard access may be blocked, use the download option instead.
  • Auto refresh feels slow. Increase the refresh interval to reduce network load and improve stability.

Advanced Tips:

  • Tip Use an anchor offset to inspect the board for a later part of the day without changing your device clock.
  • Tip Keep the result limit small, then use destination filtering to reduce scanning time at large hubs.
  • Tip Compare the route delay chart against the stop list to see whether lateness accumulates or is recovered mid route.
  • Tip If you track connections, refresh just before the transfer station since rounding can hide small movements.
  • Tip Use rail only mode when you want a pure train board and fewer mixed mode results.
  • Tip Save JSON exports when you need a reproducible snapshot for debugging and sharing.
  • Tip When delays jump unexpectedly, check whether the service is marked cancelled before reacting to minutes alone.

Glossary:

Station board
A list of upcoming arrivals or departures for a single station.
Planned time
The scheduled time from the timetable, used as the baseline.
Expected time
A predicted time that updates as real operations change.
Delay
Expected time minus planned time, rounded to whole minutes.
Cancellation
A flag indicating the service is not expected to run as planned.
Anchor time
The reference time used to start the lookahead window.
Lookahead window
How far ahead the tool keeps services relative to the anchor.
Pass list
A stop sequence returned for a service, used for route and chart views.