
Occupancy is a balance, not a count - why a headcount drifts
Anyone measuring occupancy with people counters deals with two numbers that look almost identical and behave completely differently. One is footfall: how many people came in? The other is occupancy: how many are here right now? Occupancy is entries minus exits, and every counting error stays in that balance until it starts over.
The difference sounds like a nuance and is the reason one number stays stable while the other drifts. Footfall is a count. Occupancy is a balance.
A count is immune to its own past: a missed entry at 10:14 makes the figure for 10:14 slightly off and leaves every other minute alone. A balance is the opposite - every deviation stays in it until somebody resets it. This article is about what follows from that. It builds on People counting: technologies compared and Measuring dwell time.
Why a balance drifts
Occupancy is the running sum of entries minus exits. That is the arithmetic behind every counting line, and that sum has an awkward property: it has no memory of its own deviations, but it keeps all of them.
A worked example. An installation counts at 99 per cent accuracy - a very good figure. On a day with 4,000 entries and 4,000 exits, that is around 80 events off. If the installation errs equally in both directions, say one per cent short everywhere, the errors cancel out in the balance. If they fall randomly in both directions, usually fewer than ten remain - the spread grows only with the square root of 80, just under nine. Only in the worst case - every error in the same direction, for instance because dense groups leave together in the evening or a counting line sits at the edge of the field of view - do eighty remain.
Eighty people who are not there then appear on the dashboard. Without a zero point, the next day another eighty are added. After a week the display shows an occupancy nobody takes seriously - and that is the good case, because somebody notices.
The bad case is the slow one: a deviation of five people a day goes unnoticed for weeks in a building with three hundred occupants. It is there all the same, and it grows.
Which leads to the most important sentence about occupancy, and one you will rarely find on a datasheet: how accurate an occupancy figure stays over the days depends at least as much on when, and how often, the balance starts over as on counting accuracy.
The cut at three in the morning
One thing above all counters the build-up: a regular zero point. The running sum starts afresh once a day. In principle, at most one day's deviation then accumulates rather than everything since installation.
The interesting question is when. Midnight is the obvious answer and the worse one.
A zero point has to fall when nobody is there - otherwise it sets the balance to zero while twenty people are still in the building, and those twenty can be missing from the figure all day. At midnight, restaurants, cinemas, bars and theatres routinely still have people in them. At three in the morning, most public-facing venues are empty.
So the balance restarts at 03:00 - in the site's local time, not the data centre's. A site in Zurich and one in Singapore restart at different absolute moments, each at its own three o'clock. A shared moment would land in the middle of trading for one of them: 03:00 in Zurich is 09:00 or 10:00 in Singapore, depending on summer or winter time.
The time zone applies to more than occupancy: every daily and hourly total in the analyses is formed in the site's time zone. The three o'clock cut, on the other hand, applies only to the running balance; daily footfall totals start at local midnight. That sounds obvious and in many systems is not the case. Cut daily values in UTC and, in Switzerland, the first one or two hours after midnight slide into the previous day - and you end up comparing days that do not contain the same hours.
The zero that isn't one - and the number below zero
That “empty” and “unknown” are two states, and that a display without data must never show “0”, is covered in Measuring dwell time: after three minutes without an update a value counts as stale, before any threshold is compared. The same rule applies to the occupancy of a whole site. What was not measured renders as a dash, never as a flattering zero - the interface shows “—”.
Why it matters even more for a balance than for a zone: a sensor outage that passes as zero looks like a particularly quiet day. And a quiet day turns into a decision - staff pulled, an alert not raised, a site marked down in a comparison. A zero closes the question; a dash asks it.
The public display at the entrance is stricter, because it is read faster: it counts as stale after 30 seconds without an update and as offline after 120 seconds. Someone standing in front of the screen should not take a number from five minutes ago for the situation right now.
What is new compared with a zone is a second problem, and it belongs to the balance alone: the sign. Arithmetically, occupancy goes negative as soon as more exits than entries have been registered. Minus four people is not information, though, it is an artefact. So occupancy is floored at zero per category. The floor keeps the display readable.
The resolution ladder
Footfall is stored by the minute, each minute as its own record, for 730 days. Any coarser view can be built from that - but not every combination of period and resolution makes sense. Half a year at minute resolution is over a quarter of a million points. A chart of it draws one bar per screen column and answers nothing.
So the ladder is fixed:
| Selected period | Available resolution | What for |
|---|---|---|
| up to 1 day | 1, 5, 15 or 30 minutes, 1 hour | Full detail for daily operations |
| 2 to 3 days | 15 or 30 minutes, 1 hour, 1 day | Day-on-day comparison without minute noise |
| 4 to 14 days | 1 hour, 1 day | Weekly patterns instead of single minutes |
| over 14 days | 1 day, up to 366 days | Response time and readability |
The point is that the ladder is enforced on the server, not in the interface. A limit in the interface is a suggestion - anyone fetching the data another way bypasses it. A check on the server applies to every access path alike. And because the raw data stays at minute resolution regardless, a later analysis can be finer than today's view.
Beneath the chart sits the peak at the selected resolution - peak hour, peak day, peak week or peak month - with time and value. That sounds like convenience and is a safeguard: otherwise every department reads a different peak off the same curve. If the maximum is zero or below, the callout is dropped rather than claiming zero as a peak.
Live means seconds, not minutes
Live occupancy is fetched afresh every two to five seconds. That is not a fetish for freshness but the condition for the number to be usable at the door. An occupancy figure that is a minute old no longer answers “is there room right now” - at a busy entrance, twenty people come and go in a minute.
A bare number says little: 240 people is a lot or a little depending on the floor area. So the value is shown alongside utilisation as a percentage of the capacity on record.
For the entrance area there is the display as a separate route: full screen, no login, with a traffic light, a ring, a counter and a clock in local time. By default the light turns amber at 80 per cent of the threshold and red at 100 per cent.
Two details make it a display you can hang in a public space:
- Access runs on a dedicated display key that can be revoked individually. At most ten are active at once per site and function. A screen in an entrance is physically reachable; whatever it depends on has to be switchable off without anybody changing a password.
- The threshold belongs to the key, not to the address. Changing the URL does not change the display. A traffic light you could turn green by editing a link would not be one.
On top of that, requests are rate-limited per address and per key, and every access is logged. Why the display carries no personal data either is covered in People counting and privacy.
The best time to visit - and what the confidence measures
From history you can work out which of the next twelve hours are likely to be quietest. The three quietest are highlighted - a hint you can actively give visitors, on a notice, on the phone, in an app. The arithmetic is open, and it has two properties worth knowing.
First, the weighting. For each weekday and hour, the average of days eight to twenty-eight counts at 0.6 and the average of the last seven days at 0.4. The older three weeks carry the pattern, the latest week carries the current situation. Use only last week and you turn a school-holiday week into the rule; use only the month and you notice a change three weeks late. The precondition follows: at least four weeks of history.
Second, the confidence, and this is where it pays to look closely. It is the number of comparable weekday hours, divided by three, times one hundred, capped at one hundred. Full confidence therefore means: this statement rests on at least three comparable hours.
In other words: confidence measures how much data sits behind a statement - not how often it has been right in the past. It is a measure of evidence density, not a hit rate.
The distinction is not academic. A hit rate would be measured forecast accuracy - how often the prediction has been right so far. Evidence density is a statement about the basis. Mistaking one for the other overrates a weighted average. Which is exactly why it is called what it is here.
Expected against actual
For sites that run sessions - screenings, classes, events, guided tours - there is one question that can never be answered after the fact: was the venue really as full during the session as the bookings said?
Registered and actual attendance diverge, in both directions, and rarely does anyone notice in time. Afterwards the gap is asserted or disputed, but not evidenced.
The reconciliation for it is plain: each session has an expected value, set against the site's measured headcount, the difference in absolute terms and as a percentage, and the capacity used. A discrepancy counts as detected as soon as it exceeds the site's threshold - 10 per cent by default. The peak is sampled every minute, the history of discrepancies is kept, and a discrepancy alert is evaluated when a session closes.
The result is unspectacular and exactly right: deviations get documented instead of debated. And because the expected value and the threshold can be changed directly in the view, the expected value can be set for each session and the threshold per site.
Why Tuesday was down belongs on Tuesday
Every footfall curve has outliers. Three weeks later nobody can explain them: the roadworks outside the entrance, the promotion, the wing closed at short notice - the reason lives in emails, chats and heads, but not next to the number.
That is not a documentation problem but a measurement problem. At the next analysis an unexplained outlier is either counted in or quietly left out, and both change the result without anyone seeing it.
The fix is plain: the explanation sits where the number sits. A note is anchored to its day directly beneath the chart, with one of eight categories, free tags and an impact rating from 0 to 10. Notes can be pinned and marked as done, and filtered by category, tag and author.
The benefit does not show on day one but at the first change in the team. Whoever joins reads the curve together with its history - and an outlier is then either explained or visibly open.
How we do it
The ANALYSIT Counting System stores entries by the minute as an atomic counter per site and sensor and keeps them for 730 days. Daily and hourly totals are formed in the site's time zone; the server enforces which combinations of period and resolution are allowed. The peak at the selected resolution - hour, day, week or month - sits right on the chart.
Live occupancy is a running count from 03:00 local time, floored at zero per category and refreshed every two to five seconds, with utilisation as a percentage of the capacity on record. If updates stop, a dash appears instead of a zero. The entrance display works without a login, with a traffic light and an individually revocable display key.
On top come the best time to visit over the next twelve hours with its stated confidence as a measure of the data behind it and, both available as options, the reconciliation of expected against actual headcount with threshold, session timeline and discrepancy history, and notes pinned to the day directly beneath the chart.
If you need a display at your entrance or have to reconcile sessions against bookings, talk to us. The first questions are: where are your entrances, and how many people is your building designed for?
