Write and check a model › Build data apps › Model walk

Write and check a model › Build data apps

Model walk

A small top-down game over a robot arm's bench run. Walk with the arrow keys into each part to read its numbers. It does the job of the anfra Data Quest app.

archec new my-app --kind data-app --template model-walk
archec ui preview my-app/main.arche --serve

What it shows#

  • canvas walk "Walk the arm" { walk part in Parts; columns max(temp), mean(current), mean(load), faults }: a room per part, the warmer the hotter the part. Click the map, then walk with the arrow keys or W A S D. In a room, its numbers are shown beside the map, and the room is ticked. A click on a room goes there.
  • Three tiles under it: the hottest part, the average current, the faults.

The data#

  • data/parts.csv: every five minutes for a day, per part: at, part, temp, current, load, faults.

Limits#

  • The rooms are in the order of the parts' names, not where the parts are on the arm.
  • A room's colour is its first number of columns.

The model is lib/data-apps/model-walk/main.arche, and the gallery lists the other templates.