Earthquakes card

Recent earthquakes: the largest of the window as a big magnitude, a list of the latest with place, time and depth, and a seismogram of the day.

Category: Weather. Tags: Alerts and status, Weather and environment.

Previews

Earthquakes
Canvas
Earthquakes
Corner
Earthquakes
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.earthquakes/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"Earthquakes"maxLength: 40
areastring""maxLength: 60Where the list covers, shown beside the title: Within 500 km of Vancouver. A feed's area name fills it when empty.
windowHoursinteger24minimum: 1; maximum: 168How far back the card looks.
minMagnitudenumber2.5minimum: 0; maximum: 9
countinteger10minimum: 3; maximum: 20Most rows in the list.
sortstring"recent""recent", "largest"
unitsstring"km""km", "mi"
staleMinutesinteger90minimum: 5; maximum: 1440
hour12booleanfalse
locationobjectadditionalProperties: falsePlace the distances are measured from. Selects the feed.
location.namestringmaxLength: 40; Required
location.latitudenumberminimum: -90; maximum: 90; Required
location.longitudenumberminimum: -180; maximum: 180; Required
radiusKmnumber500minimum: 10; maximum: 20000Quakes within this distance of the location. Selects the feed.

Dynamic properties

NameTypeDefaultValues and limitsDescription
quakesarray[]minItems: 0; maxItems: 200Recent quakes. A feed (screenrig.earthquakes/v1) wins when present; the data store supplies the same rows otherwise.
quakes[].idstringmaxLength: 40
quakes[].timestringmaxLength: 32; RequiredWhen it happened, ISO 8601.
quakes[].magnitudenumberminimum: -2; maximum: 10; Required
quakes[].placestringminLength: 1; maxLength: 100; Required12 km W of Ridgecrest, CA.
quakes[].depthKmnumberminimum: 0; maximum: 800
quakes[].distanceKmnumberminimum: 0; maximum: 20000From the screen's place.
quakes[].tsunamibooleanfalse
updatedstring""maxLength: 32When the list was 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": "earthquakes",
  "primitive": "card",
  "card": "earthquakes",
  "major": 1,
  "params": {
    "theme": "neomustard",
    "location": {
      "name": "Vancouver",
      "latitude": 49.25,
      "longitude": -123.0
    }
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "earthquakes-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/earthquakes-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"quakes":[],"updated":""}}'