Poll status.liu.se for the live campus pulse #61
Labels
No labels
animation
audio
blocked
bug report
controversial
documentation
easy
feature request
hard
medium
multiplayer
physics
ui
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#62 Show the live campus pulse on the map and building signs
elsie/liuverse
Reference
elsie/liuverse#61
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Linköping University publishes a live, public occupancy proxy at
https://status.liu.se/: Närvaro på campus, the number of people attached tothe campus Wi-Fi, per building, refreshed roughly every ten minutes.
The page is not an API, but its own scripts consume one:
/dynamic/presence/linköping.csv— the Linköping total, three columns afterthe timestamp: students, employees, guests.
/dynamic/presence/liu.csv— all of LiU, same shape./dynamic/presence/<building>.csv— one building, same shape. Observed idsinclude
ahuset,bhuset,chuset,dhuset,ehuset,fysikhuset,studenthuset,kårallen,terra,temahuset,ihuset,zenitandvallfarten, plus the Norrköping and Lidingö equivalents./dynamic/presence.html— the rounded top-list the page renders.The CSV is a ~14-day rolling window at ten-minute resolution, no header,
ISO-like timestamps without a zone. Values are rounded to the nearest ten, so
a building showing
10at 03:00 is noise, and the per-building rows do not addup to the city total. The response carries
Last-Modified,ETagandAccept-Ranges: bytes;Range: bytes=-512returns the tail, which is all a liveupdate needs. There is no key, no account and no CORS header.
Why the server and not the bake or each client:
of its own today;
the one thing that owns shared truth;
Proposed shape:
liuverse-server::presence: a task that fetches the tail oflinköping.csvand each mapped building CSV every ten minutes, with
If-None-Match/If-Modified-Sinceand a backoff on failure. At startup, fetch the full CSVsonce to learn a per-building peak for normalisation.
ServerMsg::CampusPresence { total: Presence, buildings: Vec<BuildingPresence>, age_seconds: u16, stale: bool };Presence { students, employees, guests }.BuildingPresence { building: u16, presence: Presence, peak: u32 }.buildingis the index into the embeddedBakedWorld::buildings, resolved by name once at startup, so both ends agreewithout shipping strings every tick.
Welcome, broadcast onchange. Keep the last good snapshot across fetch failures and mark it stale.
ihusetcovers more than one baked shell andneeds a decision;
keyhusethas no series and is excluded.fatal. No custom User-Agent.
reqwestis already a workspace dependency (the bake uses its blocking half);the server has no HTTP client yet. Add it there, not a new HTTP crate.
docs/status.mdwith the endpoints, cadence, rounding, coverage and theslug-to-building table, linked from
ARCHITECTURE.md's sources.This is an occupancy proxy, not a headcount: it is Wi-Fi devices, rounded, and
it includes staff and guests. Say so wherever it is shown.
Related
The data is interesting, but this is the riskiest issue in the batch and it has four follow-ups hanging off it (#62–#65). It depends on a page that is explicitly not an API, has no CORS, is rounded to ten and ten minutes stale, and can disappear without notice. That is fine for an ambient "campus is busy" signal, not for a protocol-level feature stack. I'd land #61 alone behind a timeout and an
unknownfallback, and explicitly make #62–#65 optional. Also be careful with the framing: "the building has 340 people" is a stronger claim than the source supports.