Vessel traffic card

Vessels arriving at and leaving a port: the next arrival's countdown, its approach to the berth, and the arrivals and departures that follow.

Category: Public information. Tags: Transit and travel, Schedules.

Previews

Vessel traffic
Canvas
Vessel traffic
Corner
Vessel traffic
Chip

Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

Card views, themes and publishing. Browse the gallery.

Data and privacy

Feed: screenrig.vessels/v1.

Feed documents carry source attribution. The Player supplies the feed to the card.

Properties

For theme, background, accent and position, see Common properties.

Set static properties in params. Bind data to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in params. Nested rows describe the contents of their parent property.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring"Vessel traffic"maxLength: 40
portstring""maxLength: 40The port's name, when the feed carries none.
windowHoursinteger12minimum: 1; maximum: 48Vessels due later than this are left out.
countinteger5minimum: 2; maximum: 8Most vessels in each of the arrivals and departures lists.
maxDistanceKminteger50minimum: 5; maximum: 500The length of the approach lane: the distance at which a vessel starts it.
unitsstring"nautical""nautical", "metric", "imperial"nautical: nm and kn. metric: km and km/h. imperial: mi and mph.
staleMinutesinteger15minimum: 1; maximum: 1440
hour12booleanfalse

Dynamic properties

NameTypeDefaultValues and limitsDescription
vesselsarray[]minItems: 0; maxItems: 100Vessels due at or leaving the port. A feed (screenrig.vessels/v1) wins when present; the data store supplies the same rows otherwise.
vessels[].idstringmaxLength: 40
vessels[].namestringminLength: 1; maxLength: 40; Required
vessels[].typestringmaxLength: 30Vessel type, for example Container ship.
vessels[].flagstringmaxLength: 30
vessels[].lengthMnumberminimum: 1; maximum: 500
vessels[].fromstringmaxLength: 40Port of departure, for an arrival.
vessels[].tostringmaxLength: 40Next port, for a departure.
vessels[].berthstringmaxLength: 40
vessels[].etastringmaxLength: 32Arrival time, ISO 8601.
vessels[].etdstringmaxLength: 32Departure time, ISO 8601.
vessels[].statusstring"underway", "anchored", "berthed", "departing"A berthed or departing vessel with an etd is a departure.
vessels[].distanceKmnumberminimum: 0; maximum: 5000Distance to the port.
vessels[].speedKtnumberminimum: 0; maximum: 60
updatedstring""maxLength: 32When the positions were fetched, ISO 8601 (data store only; a feed carries fetchedAt).

Canvas example

Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.

{
  "id": "vessel-traffic",
  "primitive": "card",
  "card": "vessel-traffic",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "vessel-traffic-main"
}

Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see API authentication.

curl --request PUT "https://api.screenrig.ai/api/card-data/vessel-traffic-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"vessels":[],"updated":""}}'