Get all public arrivals and departures for the supplied CRS code within a defined time window, including service details.

GetArrDepBoardWithDetailsRequest(
  crs,
  filterCrs = NA,
  filterType = "from",
  numRows = 150,
  timeOffset = 0,
  timeWindow = 120,
  token = get_token(),
  url = "https://lite.realtime.nationalrail.co.uk/OpenLDBWS/ldb11.asmx",
  verbose = FALSE
)

Arguments

crs

(string, 3 characters, alphabetic): The CRS code of the location for which the request is being made.

filterCrs

(string, 3 characters, alphabetic): The CRS code of either an origin or destination location to filter in. Optional.

filterType

(string, either "from" or "to"): The type of filter to apply. Filters services to include only those originating or terminating at the filterCrs location. Defaults to "to".

numRows

(integer, between 0 and 150 exclusive): The number of services to return in the resulting station board.

timeOffset

(integer, between -120 and 120 exclusive): An offset in minutes against the current time to provide the station board for. Defaults to 0.

timeWindow

(integer, between -120 and 120 exclusive): How far into the future in minutes, relative to timeOffset, to return services for. Defaults to 120.

token

Token to access the data feed. The token can be obtained at http://realtime.nationalrail.co.uk/OpenLDBWSRegistration/.

url

Data feed source URL.

verbose

Boolean flag to indicate whether or not to show status messages.

Source

Documentation for the Live Departure Boards Web Service (LDBWS / OpenLDBWS): http://lite.realtime.nationalrail.co.uk/openldbws/

Value

Tibble with arrival and departure records. Each column is described below:

generatedAt

The time at which the station board was generated.

locationName

The name of the location that the station board is for.

crs

The CRS code of the location that the station board is for.

filterLocationName

If a filter was requested, the location name of the filter location.

filtercrs

If a filter was requested, the CRS code of the filter location.

filterType

If a filter was requested, the type of filter.

nrccMessages

An optional list of textual messages that should be displayed with the station board. The message may include embedded and XML encoded HTML-like hyperlinks and paragraphs. The messages are typically used to display important disruption information that applies to the location that the station board was for. Any embedded <p> tags are used to force a new-line in the output. Embedded <a> tags allow links to external web pages that may provide more information. Output channels that do not support HTML should strip out the <a> tags and just leave the enclosed text.

platformAvailable

An optional value that indicates if platform information is available. If this value is present with the value "true" then platform information will be returned in the service lists. If this value is not present, or has the value "false", then the platform "heading" should be suppressed in the user interface for this station board.

areServicesAvailable

An optional value that indicates if services are currently available for this station board. If this value is present with the value "false" then no services will be returned in the service lists. This value may be set, for example, if access to a station has been closed to the public at short notice, even though the scheduled services are still running. It would be usual in such cases for one of the nrccMessages to describe why the list of services has been suppressed.

trainServices

A list of ServiceItem object for each services of the relevant type that is to appear on the station board. May contain zero items, or may not be present at all.

busServices

A list of ServiceItem object for each services of the relevant type that is to appear on the station board. May contain zero items, or may not be present at all.

ferryServices

A list of ServiceItem object for each services of the relevant type that is to appear on the station board. May contain zero items, or may not be present at all.

See also

Examples

if (FALSE) { rdg<- trainR::GetArrDepBoardWithDetailsRequest("RDG") rdg <- trainR::GetArrDepBoardWithDetailsRequest("RDG", filterCrs = "BRI") trainR::print(rdg) }