From ae45c1031f392dc69a2da7c99e72f3ac0bd10894 Mon Sep 17 00:00:00 2001 From: Noel Sabia Date: Sat, 14 Nov 2026 09:14:03 +0100 Subject: [PATCH] Apply fact-check corrections: v1.1 metrics, data populations, citations --- OUTLINE.md | 4 ++-- README.md | 8 ++++---- main-extended.md | 52 ++++++++++++++++++++++++++---------------------- main.md | 51 +++++++++++++++++++++++------------------------ 4 files changed, 59 insertions(+), 56 deletions(-) diff --git a/OUTLINE.md b/OUTLINE.md index f772693..2ee78f8 100644 --- a/OUTLINE.md +++ b/OUTLINE.md @@ -1,6 +1,6 @@ # PulseCast paper — writing plan -Status: **Version A draft written** (`paper/main.md`, ~3,600 words, 9 references); **Version B draft written** (`paper/main-extended.md`, ~9,600 words, 43 references), with the privacy/legal review corrections applied. Research notes are in `paper/research/`. +Status: **Version A draft written** (`paper/main.md`, ~3,600 words, 9 references, product-first); **Version B draft written** (`paper/main-extended.md`, ~10,000 words, 44 references), with the privacy/legal and fact-check corrections applied. Research notes are in `paper/research/`. ## Title options @@ -116,7 +116,7 @@ Keep the structure required by `agents/paper.md` and `OKF_Vault/mission/paper.md ## Dependencies / open items - [x] Data-quality note (`07-data-quality.md`) — complete; figures in `paper/research/figures/`. -- [x] k6 120-client result — 120/120 opened/closed, 0 errors, p95 event 1.03 s. +- [x] k6 120-client result — v1.1: 120/120 opened/closed, 0 errors, p95 event 331 ms, p95 scenario 646 ms. - [x] Per-sensor MAE table — computed from the production 7-day model. - [x] Metrics reconciliation — canonical: production 3.32/27.5/0.777; day-ahead 3.36/27.8/0.763. The mission brief’s 3.36/27.8/0.779 was the quick baseline; explained once. - [x] Live app/API URLs, image sizes, plan latency. diff --git a/README.md b/README.md index 0957fd1..c8f083e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Two versions of the paper, plus the research trail. | File | What it is | Status | |---|---|---| | `main.md` | Version A — 4–5 page hackathon technical report | Draft; ~3,600 words, 5 figures, 4 tables | -| `main-extended.md` | Version B — 10–12 page Zenodo paper | Draft; ~9,600 words, 37 references | +| `main-extended.md` | Version B — 10–12 page Zenodo paper | Draft; ~10,000 words, 44 references | | `references.md` | Canonical reference list and verification checklist | Draft | | `OUTLINE.md` | Writing plan, claims/non-claims, figures/tables | Working document | | `figures/` | Generated figures used by both versions | Draft figures | @@ -32,11 +32,11 @@ paper/figures/fig_forecast.png - Canonical metrics: production 7-day **3.32 / 27.5% / 0.777**; day-ahead weather **3.36 / 27.8% / 0.763**; seasonal naive **5.40 / 44.7% / 0.462**. The mission brief’s 3.36/27.8/0.779 was the quick baseline; the paper explains the difference once. - Deployment: live app https://pulse.noelsabia.dev; API https://api-pulse.noelsabia.dev. - v1.1 images: api 16.9 MB, web 249 MB, ml 952 MB. -- Plan latency: 42.8 ms local v1.1; contract < 2 s. -- 120-client Cloudflare k6: 120/120 SSE opened and closed, 0 connection errors, p95 event 1.03 s, p95 scenario 194 ms, presenter POST 82.69 ms, 2,760 events, 4m53s. +- Plan latency: 19 ms cold on v1.1; contract < 2 s. +- v1.1 120-client Cloudflare k6: 120/120 SSE opened and closed, 0 connection errors, p95 event 331 ms, p95 scenario 646 ms, presenter POST 49.60 ms, 4m57.9s. The v1.0 baseline was 1.03 s / 194 ms / 82.69 ms / 4m53s; the papers report v1.1. - Per-sensor MAE: computed from the production 7-day model; `n ≈ 669` per sensor. - Figures: generated from the raw CSV and the trained model; the plan screen is a print reconstruction of the provided screenshot. -- References: 9 in Version A, 43 in Version B; all are real sources from the research notes. Verify DOIs/URLs before submission. +- References: 9 in Version A, 44 in Version B; all are real sources from the research notes. Verify DOIs/URLs before submission. - AI disclosure: included in both versions; the text says the authors checked each number and citation, and flags legal/guidance/inference sources rather than claiming universal verification. ## Known TODOs diff --git a/main-extended.md b/main-extended.md index e364456..c9c9561 100644 --- a/main-extended.md +++ b/main-extended.md @@ -7,7 +7,7 @@ ## Abstract -Low-cost Bluetooth footfall counters are increasingly used to justify staffing, advertising, and urban-planning decisions. Their central claim is that they measure pedestrian density while preserving privacy. We audit that claim on the eight-sensor PAX counter network deployed in Heilbronn, Germany. A code-level review of the public firmware shows that each published “15-minute” value is a **~10-second** passive BLE scan: the node counts distinct locally administered addresses, truncates the last two MAC bytes into a 16-bit ID, multiplies by a fixed factor (default 0.7), and sleeps for 900 seconds. The effective duty cycle is about 1.1%. The data confirm the semantics: all 83,156 density values in the eight-sensor panel are exact multiples of 0.7; reconstructed counts have median 12 and maximum 418; a hardware replacement produces a 35.2-day gap and a scale break from a 1.0 integer grid to a 0.7 grid. Coverage is sparse: only 28.2% of 15-minute slots contain all eight sensors, 5.18% of individual readings are zero, and cross-sensor correlation falls from 0.58 to 0.38 after removing hour-of-week structure. Legally, MAC addresses are very likely personal data in this context; truncation does not anonymise — it produces a weak, transient identifier that may be pseudonymous in context; and passive sniffing under § 25 TDDDG is contested. We then propose a privacy-first architecture: thermal/radar/camera/probe/manual sensing with calibration, a network-aware hierarchical spatial model, a quantile forecast with conformal calibration, and a decision layer evaluated by regret rather than MAE alone. We show how the same decision-grade contract transfers directly to staffing and advertising, conditionally to waste routing, as a sibling to sensor placement and LoRaWAN planning, and not at all to sentiment or learning-guide tasks. The contribution is not a better people counter; it is an honest measurement model and a staged path to one. +Low-cost Bluetooth footfall counters are increasingly used to justify staffing, advertising, and urban-planning decisions. Their central claim is that they measure pedestrian density while preserving privacy. We audit that claim on the eight-sensor PAX counter network deployed in Heilbronn, Germany. A code-level review of the public 2026 firmware (commit e8be8bf) shows a **~10-second** passive BLE scan: the node counts distinct locally administered addresses, truncates the last two MAC bytes into a 16-bit ID, multiplies by a fixed factor (default 0.7), and sleeps for 900 seconds. The effective duty cycle is about 1.1% in that code. The deployed 2025 binary may differ; the data confirm the 0.7 scaling and per-wake export, not the scan duration or the 16-bit truncation. In the **12 June model window** (83,156 values), all values are exact multiples of 0.7; reconstructed counts have median 12 and maximum 418. Coverage in the **18 June coverage panel** (82,170 readings) is sparse: only 28.2% of 15-minute slots contain all eight sensors, 5.18% of all 96,232 density rows are zero, and, in the **12 June model window**, cross-sensor correlation falls from 0.58 to 0.38 after removing hour-of-week structure. Legally, MAC addresses are very likely personal data in this context; truncation does not anonymise — it produces a weak, transient identifier that may be pseudonymous in context; and passive sniffing under § 25 TDDDG is contested. We then propose a privacy-first architecture: thermal/radar/camera/probe/manual sensing with calibration, a network-aware hierarchical spatial model, a quantile forecast with conformal calibration, and a decision layer evaluated by regret rather than MAE alone. We show how the same decision-grade contract transfers directly to staffing, as an analytical extension to advertising, conditionally to waste routing, as a sibling to sensor placement and LoRaWAN planning, and not at all to sentiment or learning-guide tasks. The contribution is not a better people counter; it is an honest measurement model and a staged path to one. ## 1. Introduction @@ -15,17 +15,17 @@ A store manager on Kaiserstraße knows next week’s weather forecast and the st The Schwarz Digits *Pulse of the City* challenge asks teams to turn “privacy-preserving” pedestrian counts from Heilbronn into predictive tooling for advertising, store locations, and staffing [1]. The wording is doing a lot of work. “Pedestrian counts” implies people; “privacy-preserving” implies that the sensing layer has been designed around a privacy guarantee. Neither claim is self-evident. The counters are LoRaWAN-connected ESP32 devices that passively sniff Bluetooth Low Energy (BLE) advertisements and transmit aggregated device counts [2]. The challenge brief calls them privacy-preserving because they count devices rather than identify people [1]. That is a meaningful architectural choice, but it is not a measurement guarantee, and it is not a legal anonymisation guarantee. -This paper started as an attempt to write the technical report for a hackathon system, PulseCast, that turns the counts into a weekly staffing plan. The system works: on a 28-day holdout, a global weather-aware gradient-boosted model reaches MAE 3.32, WAPE 27.5%, and R² 0.777 against a seasonal-naive baseline of 5.40, 44.7%, and 0.462. The plan is generated in 42.8 ms locally on v1.1 (contract: under two seconds) on a three-service deployment on STACKIT SKE, and the deployed system handled 120/120 concurrent SSE clients with zero connection errors and a p95 event latency of 1.03 s. But the more we looked at the sensing layer, the clearer it became that the model was predicting a **different quantity** from the one the narrative claimed. The code and the data agree: each value is a short-window count of randomized BLE addresses scaled by a fixed factor. The “15-minute” cadence is the sleep cycle, not the integration window. +This paper started as an attempt to write the technical report for a hackathon system, PulseCast, that turns the counts into a weekly staffing plan. The system works: on a 28-day holdout, a global weather-aware gradient-boosted model reaches MAE 3.32, WAPE 27.5%, and R² 0.777 against a seasonal-naive baseline of 5.40, 44.7%, and 0.462. The plan is generated in 19 ms cold on v1.1 (contract: under two seconds) on a three-service deployment on STACKIT SKE, and the deployed system handled 120/120 concurrent SSE clients with zero connection errors and a p95 event latency of 331 ms. But the more we looked at the sensing layer, the clearer it became that the model was predicting a **different quantity** from the one the narrative claimed. The code and the data agree: each value is a short-window count of randomized BLE addresses scaled by a fixed factor. The “15-minute” cadence is the sleep cycle, not the integration window. That finding changes the paper. A conventional technical report would present the model metrics and the deployment, note that the data are “estimated devices, not people,” and stop. That is not enough. If a decision support system is built on a measurement that conflates flow and dwell, cannot distinguish a phone from a watch or a car, and samples 10 seconds out of every 15 minutes, then the honest contribution is a **measurement audit** plus a **reference architecture** for the next version. The model is not the hard part. The data contract is. We make five contributions: -1. **A code-level audit** of the deployed Code for Heilbronn `lorax` firmware, with the exact measurement chain: passive BLE scan, locally-administered-address filter, 16-bit truncation, per-sensor factor 0.7, 900-second sleep, RSSI threshold −80 dBm. -2. **A forensic data analysis** of 192,464 rows, confirming the semantics in 83,156 values (100% multiples of 0.7), identifying the `density-01` calibration break, and quantifying coverage, zero-inflation, correlation, and missingness. +1. **A code-level audit** of the public 2026 Code for Heilbronn `lorax` firmware (commit e8be8bf), with the measurement chain: passive BLE scan, locally-administered-address filter, 16-bit truncation, per-sensor factor 0.7, 900-second sleep, RSSI threshold −80 dBm. The deployed 2025 binary may differ; the data confirm the 0.7 scaling and per-wake export, not the scan duration or truncation. +2. **A forensic data analysis** of 192,464 rows, confirming the 0.7 scaling in the 12 June model window (83,156 values, 100% multiples of 0.7), identifying the `density-01` calibration break, and quantifying coverage, zero-inflation, correlation, and missingness with the population stated for each statistic. 3. **A privacy and legal analysis**: why MAC addresses are likely personal data, why truncation does not anonymise and produces a weak, transient identifier that may be pseudonymous in context, why § 25 TDDDG / Art. 5(3) ePrivacy is the decisive unresolved question, and what a DPIA-compliant deployment would require. 4. **A privacy-first reference architecture**: a tiered sensing stack (thermal, radar, edge cameras, probe data, manual counts), a calibration program, a central-DP aggregation layer, a network-aware hierarchical spatial model, a quantile forecast with conformal calibration, and a decision layer evaluated by regret. -5. **A transferability matrix** across the six hackathon challenges, with explicit boundary conditions: direct for staffing and advertising, conditional for waste routing, sibling for sensor placement and LoRaWAN planning, and not applicable to cable-car sentiment or the learning guide. +5. **A transferability matrix** across the six hackathon challenges, with explicit boundary conditions: direct for staffing, analytical for advertising, conditional for waste routing, sibling for sensor placement and LoRaWAN planning, and not applicable to cable-car sentiment or the learning guide. We are deliberately conservative. We do not claim that the current network measures people, that the 0.7 factor is a validated penetration correction, that eight sensors support a city-wide heatmap, or that the staffing plan has proven ROI. We claim that the current system is a useful **relative activity index** for a local cluster, that its measurement semantics can be reconstructed from code and data, and that a privacy-first, calibrated version is feasible with a staged program. @@ -39,7 +39,7 @@ The challenge brief describes the data as “numbers of people measured in a giv ### 2.2 The code-level audit -The deployed system is maintained by Code for Heilbronn. The public repository `cfhn/lorax` (mirror name `lora-frequenzmessung`) contains the `sensor-pax` firmware, a LoRaWAN/TTN aggregator, a Go backend, TimescaleDB, and a Grafana dashboard [3]. The firmware is derived from the open-source ESP32-Paxcounter / `libpax` lineage [4]. The audit below is of the public 2026 commit; the 2025 binary may differ, but the data are consistent with the 0.7 scaling. +The system is maintained by Code for Heilbronn. The public repository `cfhn/lorax` (mirror name `lora-frequenzmessung`) contains the `sensor-pax` firmware, a LoRaWAN/TTN aggregator, a Go backend, TimescaleDB, and a Grafana dashboard [3]. The firmware is derived from the open-source ESP32-Paxcounter / `libpax` lineage [4]. The audit below is of the public 2026 commit **e8be8bf**; the deployed 2025 binary may differ, and the data confirm the 0.7 scaling and per-wake export, not the 10-second scan or the 16-bit truncation. One cycle is: @@ -90,17 +90,17 @@ The sampling design adds a second bias. A person who passes in 30 seconds has ro ### 2.4 Data forensics -The delivered CSV contains 192,464 rows: 96,232 density readings and 96,232 battery readings. There are 12 device IDs; after merging the two `density-01` IDs and excluding three test sensors, eight usable locations remain in a ~580 m × 280 m cluster: `density-01`, `hn-goetzentuem-01`, `hn-hagenbuchersee-01`, `hn-hagenbuchersee-02`, `hn-marahaus-01`, `hn-neckarufer-01`, `hn-soleo-01`, and `hn-stadtgalerie-01`. The eight-sensor panel (18 June–7 November 2026) contains 83,156 density values. +The delivered CSV contains 192,464 rows: 96,232 density readings and 96,232 battery readings. There are 12 device IDs; after merging the two `density-01` IDs and excluding three test sensors, eight usable locations remain in a ~580 m × 280 m cluster: `density-01`, `hn-goetzentuem-01`, `hn-hagenbuchersee-01`, `hn-hagenbuchersee-02`, `hn-marahaus-01`, `hn-neckarufer-01`, `hn-soleo-01`, and `hn-stadtgalerie-01`. The **12 June model window** (12 June–7 November 2026) contains 83,156 density values; the **18 June coverage panel** (18 June–7 November 2026) contains 82,170 density readings and is used for coverage statistics. -**Quantization.** Every one of those 83,156 values is an exact multiple of 0.7. The reconstructed integer `U` has median 12, p95 71, and maximum 418; 2.7% of the 83,156 values reconstruct to `U = 0`. A continuous physical series would not land on a 0.7 grid in 83,156 consecutive observations; the only plausible explanation is `value = round(0.7 × integer, 4)`. This is direct, data-internal confirmation of the firmware reading [5]. +**Quantization.** Every one of those 83,156 values in the 12 June model window is an exact multiple of 0.7. The reconstructed integer `U` has median 12, p95 71, and maximum 418; 2.70% of the 83,156 values reconstruct to `U = 0`. A continuous physical series would not land on a 0.7 grid in 83,156 consecutive observations; the only plausible explanation is `value = round(0.7 × integer, 4)`. This is direct, data-internal confirmation of the 0.7 scaling and per-wake export; it does not independently confirm the scan duration or the 16-bit truncation [5]. **The calibration break.** The legacy `density-01` device (`863f75b0`, 16 October 2025–12 March 2026) is 100% integer-valued on a 1.0 grid: 0–28, mean 3.008, median 2.0, zero share 29.8%. The replacement (`f8c19730`, 16 April–7 November 2026) is 100% on the 0.7 grid: 0–63, mean 9.741, median 7.7, zero share 5.9%. The gap between the last legacy reading and the first new reading is **35.2065 days**, with no overlap, so a conversion factor cannot be estimated empirically. The level shift is ×3.24 in the mean and ×3.85 in the median, which is not explained by 0.7 alone; season, installation, and sensitivity are confounded. The safe conclusion is that the two series are not on the same scale and must not be pooled [5]. **Cadence.** The nominal 15-minute grid is not a 15:00 wall-clock grid. Current devices report every 15.27–15.37 minutes (median); the legacy device every 15.18 minutes with ~18 s jitter; the new `density-01` every 16.14 minutes with ~2.4 s jitter, producing ~89 readings/day. Flooring to `HH:00/15/30/45` is an approximation; two devices matched to the same slot can be up to ~15 minutes apart [5]. -**Coverage.** Only **28.2%** of 15-minute slots contain all eight sensors; the modal count is seven (4,117 slots). Aggregating to 30, 60, or 120 minutes raises complete eight-sensor coverage to **63.4%, 69.7%, and 71.0%**, respectively. Median monthly coverage is 86.1%, but August 2026 falls to 54.2% on average and 23.3% at the worst location. Six of eight locations show a simultaneous multi-week degradation; `density-01` and `hagenbuchersee-01` do not. Coverage is strongly confounded with battery across devices (r = 0.84, n = 8), but the cause cannot be isolated [5]. +**Coverage.** In the **18 June coverage panel (82,170 readings)**, only **28.2%** of 15-minute slots contain all eight sensors; the modal count is seven (4,117 slots). Aggregating to 30, 60, or 120 minutes raises complete eight-sensor coverage to **63.4%, 69.7%, and 71.0%**, respectively. Median monthly coverage is 86.1%, but August 2026 falls to 54.2% on average and 23.3% at the worst location. Six of eight locations show a simultaneous multi-week degradation; `density-01` and `hagenbuchersee-01` do not. Coverage is strongly confounded with battery across devices (r = 0.84, n = 8), but the cause cannot be isolated [5]. -**Distribution and correlation.** Overall, 5.18% of readings are zero, 10.36% are `<1`, and 39.57% are `<5`. There are no negative or NaN values and no duplicate timestamps; 113 intervals are shorter than 60 seconds and look like retries. Raw cross-location Pearson correlation averages 0.58 (range 0.13–0.90), but drops to 0.38 after removing location-specific hour-of-week means and 0.48 at the daily level. Correlation is not evidence of shared unique visitors [5]. +**Distribution and correlation.** Across all **96,232 density rows**, 5.18% are zero, 10.36% are `<1`, and 39.57% are `<5`; in the **12 June model window** the shares are 2.70%, 8.32%, and 35.86%. There are no negative or NaN values and no duplicate timestamps; 113 intervals are shorter than 60 seconds across the core devices, 7 of them in the eight-sensor panel, and they look like retries. Raw cross-location Pearson correlation in the 12 June model window averages 0.58 (range 0.13–0.90), but drops to 0.38 after removing location-specific hour-of-week means and 0.48 at the daily level. Correlation is not evidence of shared unique visitors [5]. **What the aggregates cannot tell us.** The CSV contains no MAC addresses, address type, RSSI, unique IDs, or ground truth. MAC-randomization rate, penetration rate, unique-device count, dwell time, repeat visits, detection radius, and false-positive/false-negative rates cannot be measured from these aggregates. The 0.7 grid is a proxy for firmware processing, not a direct measurement of randomization or penetration. Any claim about those quantities must come from a calibration study. @@ -175,7 +175,7 @@ If § 25 applies, prior consent is required, and a GDPR Art. 6 basis is not a su If the data are personal data — as we argue they should be treated — a DPIA is very likely required. Continuous sensing of a publicly accessible inner-city area is the paradigm of “systematic monitoring of a publicly accessible area on a large scale” under Art. 35(3)(c) [13]. The Baden-Württemberg private-sector “Muss-Liste” explicitly lists offline tracking of customer movements in department stores/shopping centres and the non-intended use of device sensors or radio signals to determine location or movement over a substantial period (Nos. 2 and 10) [21]. As of November 2026, we are not aware of a public-sector positive list in Baden-Württemberg, so for the city the statutory criterion applies directly [40]. -A public body acting in the performance of its public tasks cannot rely on Art. 6(1)(f); it needs Art. 6(1)(e) read with Art. 6(3) and a legal basis in Union or Member State law, or consent. A private association or company can use Art. 6(1)(f), but the balancing test is strict for public-space tracking that is invisible to most passers-by or conducted without meaningful notice, and German and Dutch DPAs have repeatedly found that the data subject’s interests prevail. The DPIA must assess necessity and alternatives: manual counts, light barriers, thermal/radar, on-device video counting, and sample-based surveys. If a less intrusive sensor can meet the accuracy requirement, the MAC-based design is hard to justify. +A public body acting in the performance of its public tasks cannot rely on Art. 6(1)(f); it needs Art. 6(1)(e) read with Art. 6(3) and a legal basis in Union or Member State law, or consent. A private association or company can use Art. 6(1)(f), but the balancing test is strict for public-space tracking that is invisible to most passers-by or conducted without meaningful notice, and German and Dutch DPAs have repeatedly found that the data subject’s interests prevail [19, 44]. The DPIA must assess necessity and alternatives: manual counts, light barriers, thermal/radar, on-device video counting, and sample-based surveys. If a less intrusive sensor can meet the accuracy requirement, the MAC-based design is hard to justify. ### 3.5 Enforcement is real but fact-specific @@ -221,7 +221,7 @@ The good news is that the MAC-based design is not the only option. The alternati | BLE MAC sniffing (baseline) | 5–12% of devices discoverable; 97%/92% count accuracy only when penetration is assumed 100% [10]; MAC randomization defeated for ~96% of Android phones [7] | €100–500 | Very high | None for public footfall; at most a short-lived calibrated index under a DPIA | | Thermal/IR array | 89–95% doorway accuracy; degrades >30 °C, >7.5 m, groups [30] | €150–400/node | Low | Default at store entrances and narrow passages | | mmWave radar | 96% presence, 69% count outdoor; −2.5% aggregate bias [28]; 3-month F1 84%, flow r 60–85% [29] | €300–700 | Low | Wide, weather-exposed crossings; presence/flow | -| Edge AI camera | 13.8% day / 29.8% night MAPE outdoors; 2–14% in official review [26] | €500–2,000; commercial €1,100–7,400 | High (DPIA) | 2–4 reference sites; pedestrian/cyclist classification | +| Edge AI camera | 13.8% day / 29.8% night MAPE outdoors [26] | €500–2,000; commercial €1,100–7,400 | High (DPIA) | 2–4 reference sites; pedestrian/cyclist classification | | LiDAR | >97% disaggregate count; 1.6–4.3% 15-min error [27] | €1,000–8,000 | Low–moderate | 1–2 high-accuracy reference sites | | Aggregated probe data | City-wide movement; coverage/bias unknown | Licence | High/commercial | City context, O/D, trends — not street-level truth | | Manual counts | ~11% clicker error; 2-hour observer fatigue | €25–40/hour | Low | Quarterly calibration audits | @@ -264,7 +264,7 @@ The PET analysis supports a layered design: - **No cross-sensor/cross-day linkage.** No trajectories, dwell, or repeat-visit metrics. - **Central DP at a trusted city aggregator.** Use a device-day privacy unit and contribution bounds (e.g. at most four sensor-bin pairs per device per day). Publish fixed daily/weekly coarse releases with a budget ledger. - **Do not use local DP for sparse 15-min bins.** Local DP error scales as `1/(ε√n)` versus central `1/(εn)`, so it destroys utility at small-city scale. At ε = 1, a 14-device cell carries ±3 noise; a live 15-min public heatmap is not viable with a meaningful annual budget [23]. -- **k-anonymity as a secondary check.** Four spatio-temporal points identify ~95% of people in a 1.5M-person mobility dataset; generalizing to k = 20 erases the local footfall signal [25]. Use k as a suppression rule, not the primary guarantee. +- **k-anonymity as a secondary check.** Four spatio-temporal points identify ~95% of people in a 1.5M-person mobility dataset [25]. In our judgement, generalizing to k = 20 would erase the local footfall signal. Use k as a suppression rule, not the primary guarantee. - **No federated learning.** The pedestrian’s phone does not run our code, so FL is not applicable to passive BLE sniffing. - **No non-DP synthetic data as an anonymity claim.** Non-DP synthetic data has no formal guarantee; use DP synthesis plus membership-inference/Anonymeter evaluation for public release, not for the live dashboard. @@ -281,7 +281,7 @@ A 12-week pilot at six sites would be enough to estimate detection rates and cal - **DPIA signed off**; legal basis documented; - **cost within the pilot budget**. -A planning estimate is **€81k–161k** for year 1 and **€30k–50k** recurring, excluding backend and staff time. These are estimates, not quotations; the point is that the privacy-first stack is not free, but it is comparable to the legal and reputational cost of a contested MAC deployment. +A planning estimate is **€81k–161k** for year 1 including a **€20k–40k** backend allowance (**€61k–121k** excluding backend), and **€30k–50k** recurring, excluding staff time. These are estimates, not quotations; the point is that the privacy-first stack is not free, but it is comparable to the legal and reputational cost of a contested MAC deployment. ## 5. From sparse observations to decisions @@ -313,10 +313,12 @@ The forecast core should be a global (panel) gradient-boosted model with quantil The decision layer should be explicit about the objective and constraints. For staffing, the current heuristic is a reasonable first step: ```text -required staff = ceil(forecast / visitors-per-staff-hour × safety factor) +required staff = ceil(index × k / visitors-per-staff-hour × safety factor) subject to minimum staff, shift length, opening hours, cost ``` +`k` converts index units to visitors. It is **unvalidated**. Setting `k = 1` would treat one index unit as one visitor, which the measurement audit says is not justified; the plan is only as calibrated as `k`. + A production system could use a stochastic optimization or a robust optimization, but only when the utility and constraints are measured. The important move is to separate the predictor from the decision rule, propagate uncertainty, and evaluate **decision regret**: what would the plan have cost if the true footfall had been known? Without POS/queue/labor data, the paper can only compare to a flat schedule under stated assumptions. That is a heuristic comparison, not ROI. ### 5.6 Evaluation harness @@ -338,7 +340,7 @@ This is standard MLOps hygiene [35], but it is often skipped in hackathon system The PulseCast results are a useful anchor. The production 7-day model reaches 3.32/27.5/0.777; the day-ahead model 3.36/27.8/0.763; the seasonal naive 5.40/44.7/0.462. Per-sensor MAE ranges 2.26–5.83. The weather ablation is large; the holiday effect is small. The mission brief’s 3.36/27.8/0.779 was the quick baseline; the generated metrics are canonical: production 7-day 3.32/27.5/0.777, day-ahead 3.36/27.8/0.763. These results show that a global model can learn the daily/weekly shape and the weather sensitivity of the index. They do not show that the index is people, that the model generalizes across cities, or that the staffing plan improves outcomes. The honest reading is a **relative decision-support signal**. -The deployed system provides a second kind of evidence. The public app is at https://pulse.noelsabia.dev and the API at https://api-pulse.noelsabia.dev. The v1.1 images are 16.9 MB (api), 249 MB (web), and 952 MB (ml). Plan generation is 42.8 ms locally; the contract is under two seconds. In the 120-client Cloudflare k6 run, 120/120 SSE connections opened and closed with zero connection errors; p95 event latency was 1.03 s, p95 scenario latency 194 ms, presenter POST latency 82.69 ms, and 2,760 events were received over 4m53s. These numbers show that the delivery path works at the demo scale. They do not validate the measurement or the decision quality. +The deployed system provides a second kind of evidence. The public app is at https://pulse.noelsabia.dev and the API at https://api-pulse.noelsabia.dev. The v1.1 images are 16.9 MB (api), 249 MB (web), and 952 MB (ml). Plan generation is 19 ms cold; the contract is under two seconds. In the v1.1 120-client Cloudflare k6 run, 120/120 SSE connections opened and closed with zero connection errors; p95 event latency was 331 ms, p95 scenario latency 646 ms, presenter POST latency 49.60 ms, and the run lasted 4m57.9s. These numbers show that the delivery path works at the demo scale. They do not validate the measurement or the decision quality. ![Figure 4. Forecast versus actual.](figures/fig_forecast.png) @@ -369,7 +371,7 @@ evaluation: L(y, x_hat) + R(a*, x_oracle) + privacy leakage | Challenge | Class | What transfers | What must change | Evidence | |---|---|---|---|---| | Pulse / staffing | Direct | Observation handling, local field, weather-aware forecast, staffing heuristic, deployment | Store-specific assumptions; calibration; outcome data | MAE 3.32 vs 5.40 naive | -| Pulse / advertising | Direct (local) | Same field and forecast; allocation objective replaces staffing | Ad inventory, cost, reach, dwell, conversion; city-wide sites for a real campaign | No result; analytical extension | +| Pulse / advertising | Analytical, not tested | Same field and forecast; allocation objective replaces staffing | Ad inventory, cost, reach, dwell, conversion; city-wide sites for a real campaign | No result; analytical extension | | Waste routing | Conditional | Temporal forecast, clustering, configurable VRP, holiday/season context | Coordinates or zone map, capacity/type, fleet/depot/shift, overflow ground truth | No result; dataset documented | | Sensor placement | Sibling | Observation model, spatial inference, error-vs-cost evaluation | Decision changes `H_t`; active learning/optimal design; no temporal forecast | Protocol only | | LoRaWAN planning | Sibling | Link/coverage prediction, candidate-site ranking, address-weighted coverage | Packet-loss estimate, buildings/terrain, longer window, GPS calibration | No result; dataset documented | @@ -380,7 +382,7 @@ evaluation: L(y, x_hat) + R(a*, x_oracle) + privacy leakage ### 6.4 Case studies -**Staffing (empirical).** The only end-to-end evidence-backed case. The path is: PAX index → weather-aware global forecast → staffing heuristic → plan. The next step is calibration and decision-level evaluation. +**Staffing (empirical).** The only evidence-backed forecast; the decision layer is unevaluated. The path is: PAX index → weather-aware global forecast → staffing heuristic → plan. The next step is calibration and decision-level evaluation. **Advertising (analytical extension).** The same field and forecast can rank the eight locations and time windows by expected exposure. This is a decision-layer substitution, not a new sensing study. It cannot support city-wide ad planning or effectiveness claims without more sites and ad-economics data. @@ -428,7 +430,7 @@ A paper that reports these tests, even if some fail, is stronger than one that a ### 7.4 System -Measured on v1.1: 120/120 SSE connections opened and closed, zero connection errors, p95 event latency 1.03 s, p95 scenario latency 194 ms, presenter POST 82.69 ms, 2,760 events over 4m53s; plan generation 42.8 ms locally (contract < 2 s); images 16.9 MB (api), 249 MB (web), 952 MB (ml). Remaining checks: +Measured on v1.1: 120/120 SSE connections opened and closed, zero connection errors, p95 event latency 331 ms, p95 scenario latency 646 ms, presenter POST 49.60 ms, over 4m57.9s; plan generation 19 ms cold (contract < 2 s); images 16.9 MB (api), 249 MB (web), 952 MB (ml). Remaining checks: - cold deployment time `[TODO]`; - failure drills: FastAPI down, Open-Meteo down, tunnel down, pod restart; @@ -453,7 +455,7 @@ Subsampling and factor sensitivity are the most informative for the paper’s th The main limitation is the measurement, not the model. The sensor samples about 10 seconds out of every 15 minutes, counts only randomized BLE addresses, truncates the address to 16 bits, multiplies by a fixed 0.7 factor, and cannot distinguish people from devices. The published value is a useful relative index, but it is not a census and not a 15-minute count. Device penetration is unknown. A single global factor cannot absorb device ownership, multiple devices per person, Bluetooth settings, and the short scan window. -Coverage is also a limitation. Eight sensors in a 580 m × 280 m cluster cannot support a city-wide heatmap or a store-location recommender. Only 28.2% of 15-minute slots have all eight sensors, and gaps are not random. The 28-day holdout is short, the weather is observed rather than forecast, and there is no event log, POS data, or labor-cost data. The deployment has one API replica, no SSO, no HA, and no live sensor ingestion. The 15-minute and 1-hour horizons are replay/nowcast, not a live feed. +Coverage is also a limitation. Eight sensors in a 580 m × 280 m cluster cannot support a city-wide heatmap or a store-location recommender. In the 18 June coverage panel, only 28.2% of 15-minute slots have all eight sensors, and gaps are not random. The 28-day holdout is short, the weather is observed rather than forecast, and there is no event log, POS data, or labor-cost data. The deployment has one API replica, no SSO, no HA, and no live sensor ingestion. The 15-minute and 1-hour horizons are replay/nowcast, not a live feed. The privacy claim also needs care. The application stores no MAC addresses, and only aggregate counts leave the sensor. But the sensing stage still processes link-layer identifiers at the edge; the 16-bit ID is a pseudonymous dedup key, not a cryptographic hash; and passive MAC sensing in public space has a contested legal basis in Germany. The “privacy-preserving” label is an architectural claim, not a formal guarantee. A production deployment would need a DPIA, a documented legal basis, data minimization, retention limits, and, where possible, a sensor that does not extract MAC addresses at all. @@ -506,13 +508,13 @@ AI tools were used for drafting and editing. The authors checked each number and [5] PulseCast data-quality analysis. `paper/research/07-data-quality.md`, 2026. -[6] Bluetooth SIG. “Enhancing device privacy and energy efficiency with Bluetooth Randomized RPA Updates,” 15 May 2025. https://www.bluetooth.com/blog/enhancing-device-privacy-and-energy-efficiency-with-bluetooth-randomized-rpa-updates/ +[6] Bluetooth SIG. “Enhancing device privacy and energy efficiency with Bluetooth Randomized RPA Updates,” 14 May 2025. https://www.bluetooth.com/blog/enhancing-device-privacy-and-energy-efficiency-with-bluetooth-randomized-rpa-updates/ [7] J. Martin, T. Mayberry, C. Donahue, L. Foppe, L. Brown, C. Riggins, E. C. Rye, and D. Brown. “A study of MAC address randomization in mobile devices and when it fails.” *Proceedings on Privacy Enhancing Technologies* 2017(4):365–383. DOI: 10.1515/popets-2017-0054. [8] J. K. Becker, D. Li, and D. Starobinski. “Tracking anonymized Bluetooth devices.” *Proceedings on Privacy Enhancing Technologies* 2019(3):50–65. DOI: 10.2478/popets-2019-0036. -[9] M. Vanhoef, C. Matte, M. Cunche, L. S. Cardoso, and F. Piessens. “Why MAC address randomization is not enough: An analysis of Wi-Fi network discovery mechanisms.” *AsiaCCS 2016*, 413–424. DOI: 10.1145/2897845.2897860. +[9] M. Vanhoef, C. Matte, M. Cunche, L. S. Cardoso, and F. Piessens. “Why MAC address randomization is not enough: An analysis of Wi-Fi network discovery mechanisms.” *AsiaCCS 2016*, 413–424. DOI: 10.1145/2897845.2897883. [10] A. Kurkcu and K. Ozbay. “Estimating pedestrian densities, wait times, and flows with Wi-Fi and Bluetooth sensors.” *Transportation Research Record* 2644(1):72–82, 2017. DOI: 10.3141/2644-09. @@ -532,7 +534,7 @@ AI tools were used for drafting and editing. The authors checked each number and [18] Conseil d’État. *JCDecaux France*, no. 393714, 8 February 2017. https://www.conseil-etat.fr/fr/arianeweb/CE/decision/2017-02-08/393714 -[19] Autoriteit Persoonsgegevens. *Wifi and bluetooth*; *Legal bases for WiFi tracking and Bluetooth tracking*. https://www.autoriteitpersoonsgegevens.nl/en/themes/internet-and-smart-devices/wifi-and-bluetooth +[19] Autoriteit Persoonsgegevens. *Wifi and bluetooth*. https://www.autoriteitpersoonsgegevens.nl/en/themes/internet-and-smart-devices/wifi-and-bluetooth [36] Rechtbank Overijssel. *Enschede / Autoriteit Persoonsgegevens*, ECLI:NL:RBOVE:2024:594, 2 February 2024. @@ -540,7 +542,7 @@ AI tools were used for drafting and editing. The authors checked each number and [20] Telekommunikation-Digitale-Dienste-Datenschutz-Gesetz (TDDDG), § 25. https://www.gesetze-im-internet.de/ttdsg/__25.html -[21] LfDI Baden-Württemberg. *Muss-Liste* nach Art. 35 Abs. 4 DS-GVO, Nos. 2 and 10. https://www.baden-wuerttemberg.datenschutz.de/ +[21] LfDI Baden-Württemberg. *Muss-Liste* nach Art. 35 Abs. 4 DS-GVO, Nos. 2 and 10. https://www.baden-wuerttemberg.datenschutz.de/wp-content/uploads/2018/05/Liste-von-Verarbeitungsvorg%C3%A4ngen-nach-Art.-35-Abs.-4-DS-GVO-LfDI-BW.pdf [22] ULD Schleswig-Holstein. *Tätigkeitsbericht 2019*, §5.4.8. https://www.datenschutzzentrum.de/tb/tb37/uld-37-taetigkeitsbericht-2019.pdf @@ -581,3 +583,5 @@ AI tools were used for drafting and editing. The authors checked each number and [42] Der Hamburgische Beauftragte für Datenschutz und Informationsfreiheit (HmbBfDI). *25. Tätigkeitsbericht Datenschutz 2014/2015*, §V.9. https://datenschutz-hamburg.de/fileadmin/user_upload/HmbBfDI/Datenschutz/Taetigkeitsberichte_Datenschutz/Taetigkeitsberichte_PDF/25.TB_2014-2015.pdf [43] Autoriteit Persoonsgegevens. *Boete wifitracking Enschede*, 29 April 2021, updated 29 July 2026. https://www.autoriteitpersoonsgegevens.nl/documenten/boete-wifitracking-enschede + +[44] Autoriteit Persoonsgegevens. *Legal bases for WiFi tracking and Bluetooth tracking*. https://www.autoriteitpersoonsgegevens.nl/en/themes/internet-and-smart-devices/wifi-and-bluetooth/legal-bases-for-wifi-tracking-and-bluetooth-tracking diff --git a/main.md b/main.md index 9605e66..59ecf00 100644 --- a/main.md +++ b/main.md @@ -7,7 +7,7 @@ ## Abstract -Inner-city store managers must decide next week's shifts without knowing next week's footfall. We present PulseCast, a decision-first staffing copilot built on eight passive Bluetooth footfall counters in a ~580 m × 280 m cluster in Heilbronn, Germany. The system fuses five months of 15-minute device counts with Open-Meteo weather and Baden-Württemberg public holidays, trains a global gradient-boosted model on a time-based split, and converts the forecast into a weekly shift plan through a transparent staffing heuristic. On a 28-day holdout, the weather-aware 7-day model reaches MAE 3.32, WAPE 27.5%, and R² 0.777, versus 5.40, 44.7%, and 0.462 for a seasonal-naive baseline; the day-ahead model reaches 3.36, 27.8%, and 0.763. The plan is generated in 42.8 ms locally on v1.1 (contract < 2 s), and the deployed system handles 120/120 concurrent SSE clients with zero errors and a p95 event latency of 1.03 s. A code-level audit shows that each published value is a ~10-second count of randomized BLE addresses multiplied by 0.7, not a 15-minute count of people. We therefore frame the result as a relative activity index that supports staffing decisions, not a city-wide people counter, and state what calibration and privacy work absolute claims would require. +Inner-city store managers must decide next week's shifts without knowing next week's footfall. We present PulseCast, a decision-first staffing copilot built on eight passive Bluetooth footfall counters in a ~580 m × 280 m cluster in Heilbronn, Germany. The system fuses five months of 15-minute device counts with Open-Meteo weather and Baden-Württemberg public holidays, trains a global gradient-boosted model on a time-based split, and converts the forecast into a weekly shift plan through a transparent staffing heuristic. On a 28-day holdout, the weather-aware 7-day model reaches MAE 3.32, WAPE 27.5%, and R² 0.777, versus 5.40, 44.7%, and 0.462 for a seasonal-naive baseline; the day-ahead model reaches 3.36, 27.8%, and 0.763. The plan is generated in 19 ms cold on v1.1 (contract < 2 s), and the deployed system handles 120/120 concurrent SSE clients with zero errors and a p95 event latency of 331 ms. A code-level audit of the public 2026 firmware commit e8be8bf shows a ~10-second scan, a 16-bit dedup key, and a 0.7 multiplier; the deployed 2025 binary may differ, and the data confirm the 0.7 scaling and per-wake export, not the scan duration or truncation. We therefore frame the result as a relative activity index that supports staffing decisions, not a city-wide people counter, and state what calibration and privacy work absolute claims would require. ## 1. Introduction @@ -27,23 +27,21 @@ We do not claim a production people counter, a city-wide heatmap, annual seasona The dataset contains 192,464 CSV rows: 96,232 density readings and 96,232 battery readings. There are 12 device IDs; after merging the two `density-01` IDs and excluding three test sensors, eight usable locations remain in a ~580 m × 280 m cluster: `density-01`, `hn-goetzentuem-01`, `hn-hagenbuchersee-01`, `hn-hagenbuchersee-02`, `hn-marahaus-01`, `hn-neckarufer-01`, `hn-soleo-01`, and `hn-stadtgalerie-01`. -The eight-sensor window runs from 12 June to 7 November 2026, with a median cadence of 15.3 minutes. Values range 0–292.6; the multi-sensor mean is ~14.4, median 7.7, p95 46.9, p99 78.4. The inner city peaks 18:00–21:00 local, top 19:00; Saturday is busiest on average (mean 19.1) [2]. The sensors are LoRaWAN-connected PAX counters that passively sniff Bluetooth Low Energy (BLE) advertisements and transmit aggregated device counts [1, 2]. The counts are estimates, not a census: device penetration, Bluetooth settings, and the scanning design all matter. +The 12 June model window (12 June–7 November 2026) has a median cadence of 15.3 minutes; values range 0–292.6, with median 8.4, p95 49.7, p99 79.8. Across all 96,232 density rows, the median is 7.7, p95 46.9, p99 78.4 and the multi-sensor mean is ~14.4. In the 12 June model window, the inner city peaks 18:00–21:00 local, top 19:00; Saturday is busiest on average (mean 19.1) [2]. The sensors are LoRaWAN-connected PAX counters that passively sniff Bluetooth Low Energy (BLE) advertisements and transmit aggregated device counts [1, 2]. The counts are estimates, not a census: device penetration, Bluetooth settings, and the scanning design all matter. ### 2.2 What one value actually is -A code-level audit of the deployed Code for Heilbronn `lorax` firmware changes the interpretation of every number in this paper [3, 4]. The node wakes from deep sleep, scans BLE passively for about 10 seconds, counts distinct locally administered (“randomized”) addresses, truncates the last two address bytes into a 16-bit ID, multiplies the integer count by a per-sensor factor (default 0.7), sends one LoRaWAN payload, and sleeps for 900 seconds [3, 4]. +A code-level audit of the public 2026 Code for Heilbronn `lorax` firmware (commit e8be8bf) changes the interpretation of the numbers [3, 4]. The node scans BLE passively for about 10 seconds, counts distinct locally administered addresses, truncates the last two address bytes into a 16-bit ID, multiplies by 0.7, and sleeps for 900 seconds. The deployed 2025 binary may differ; the data confirm the 0.7 scaling and per-wake export, not the scan duration or truncation. -**The published value is therefore `0.7 × U`, where `U` is the number of distinct randomized BLE addresses seen in a ~10-second scan.** The 15-minute cadence is the sleep cycle, not the integration window. The effective duty cycle is about 1.1%. The firmware sets a 30-second scan duration, but the released code stops on the first 10-second report callback; the 30-second value is not enforced by the scanner [4]. +In the public 2026 firmware, the published value is `0.7 × U`, where `U` is the number of distinct randomized BLE addresses seen in a ~10-second scan. The 15-minute cadence is the sleep cycle, not the integration window; the effective duty cycle is ~1.1% in that code. Every one of the 83,156 values in the **12 June model window** is a multiple of 0.7; the reconstructed count has median 12, p95 71, max 418, and 2.70% of those values are zero. A hardware replacement creates a scale break in `density-01`; the legacy and current series are not pooled [5]. -The audit is of the public 2026 firmware; the deployed 2025 binary may differ, but the data are consistent with the 0.7 scaling. Every one of the 83,156 density values in the eight-sensor panel is an exact multiple of 0.7. The reconstructed integer count has median 12, p95 71, and a maximum of 418; 2.7% of the 83,156 values reconstruct to `U = 0`. The legacy `density-01` device reports integers on a 1.0 grid until March 2026, then a replacement device reports on the 0.7 grid from April 2026, with a 35.2-day gap between the two series. The two `density-01` series are not on the same scale and must not be pooled [5]. +This is a relative activity index, not a count of people. A 30-second passer-by has a ~4.4% chance of overlapping a scan; a one-hour lingerer can be counted up to four times. The index conflates flow and dwell, cannot distinguish phones from watches/beacons/cars, and the people-per-device ratio is unknown. The 0.7 factor is a provisioning default, not a validated penetration correction. -This is a relative activity index, not a count of people. A person who passes in 30 seconds has roughly a 4.4% chance of overlapping a ~10-second scan; a person who lingers for an hour can be counted in up to four consecutive bins. The index conflates flow and dwell, and it cannot distinguish a phone from a smartwatch, earbud case, beacon, or car head-unit. Device penetration and the people-per-device ratio are unknown. The 0.7 factor is a provisioning default, not a validated penetration correction. - -> **Practical consequence.** The model predicts the published index well enough to compare relative peaks and to drive a staffing rule. It does not predict people, and it does not support absolute footfall or revenue claims without a calibration study. +> **Practical consequence.** The model predicts the index well enough to compare relative peaks and drive a staffing rule. It does not predict people, and it does not support absolute footfall or revenue claims without calibration. ### 2.3 Coverage, gaps, and context -Coverage is uneven. Only 28.2% of 15-minute slots in the analysis panel have all eight sensors reporting; the modal count is seven. Aggregating to 30, 60, or 120 minutes raises complete coverage to 63.4%, 69.7%, and 71.0% [5]. Overall, 5.18% of individual density readings are zero and 39.6% are below 5. The worst month falls to 23.3% coverage at one location. Gaps reach four to six days; the cause is undocumented, but missing periods differ systematically from full-coverage periods [2, 5]. Weather comes from Open-Meteo: historical archive for training, current/7-day forecast for the dashboard. Temperature and precipitation are the useful features; cloud and wind did not improve the short test. Baden-Württemberg holidays are a feature and badge; they added little and are context, not a large driver [2]. +Coverage is uneven. In the **18 June coverage panel (82,170 readings)**, only 28.2% of 15-minute slots have all eight sensors; the modal count is seven (4,117 slots). Aggregating to 30, 60, or 120 minutes raises complete coverage to 63.4%, 69.7%, and 71.0% [5]. Across all **96,232 density rows**, 5.18% are zero, 10.36% are <1, and 39.57% are <5; in the **12 June model window** the shares are 2.70%, 8.32%, and 35.86%. The worst month falls to 23.3% coverage at one location in the 18 June panel. Gaps reach four to six days; the cause is undocumented, but missing periods differ systematically from full-coverage periods [2, 5]. Weather comes from Open-Meteo: historical archive for training, current/7-day forecast for the dashboard. Temperature and precipitation are the useful features; cloud and wind did not improve the short test. Baden-Württemberg holidays are a feature and badge; they added little and are context, not a large driver [2]. | Sensor | Readings | Mean | Median | p95 | Max | Max daily gap | |---|---:|---:|---:|---:|---:|---:| @@ -56,7 +54,7 @@ Coverage is uneven. Only 28.2% of 15-minute slots in the analysis panel have all | hn-soleo-01 | 10,327 | 10.6 | 8.4 | 28.0 | 111.3 | 4 days | | density-01 | 12,670 | 9.9 | 7.7 | 28.0 | 63.0 | 35 days | -*Table 1. Data coverage per sensor. `density-01` uses the longer history; the 35-day gap is across the hardware replacement.* +*Table 1. Per-sensor coverage and value statistics. Except for the `density-01` max-gap entry, statistics use the 12 June–7 November 2026 model window; the `density-01` 35-day gap spans the longer history and hardware replacement.* ![Figure 1. Sensor map.](figures/fig_sensor_map.png) @@ -82,25 +80,26 @@ The model serves 15 min, 1 h, 48 h, and 7 d. The 15 min/1 h horizons are nowcast ### 3.3 From forecast to shift plan -The ML model predicts footfall; a deterministic heuristic turns it into staff: +The ML model predicts the published index; a deterministic heuristic turns it into staff: ```text -forecast footfall per hour +forecast index per hour + → calibration factor k (unvalidated) → visitors per staff per hour (service standard) - → required staff = ceil(footfall / standard × safety factor) + → required staff = ceil(index × k / standard × safety factor) → minimum staff, shift length, opening hours → shift blocks + coverage score + estimated cost ``` -The assumptions are visible and adjustable: visitors per staff hour, labor cost per hour, minimum staff, shift length, and safety factor. The manager can accept, edit, or reject the plan and regenerate with a scenario. This is decision support, not an optimizer with proven ROI; we have no POS, sales, queue, or labor-cost data. +The assumptions are visible and adjustable: calibration factor `k`, visitors per staff hour, labor cost per hour, minimum staff, shift length, and safety factor. `k` converts index units to visitors and is **unvalidated**; setting `k = 1` would treat one index unit as one visitor, which the audit says is not justified. The manager can edit assumptions and regenerate the plan with a scenario. This is decision support, not an optimizer with proven ROI; we have no POS, sales, queue, or labor-cost data. ## 4. System PulseCast runs as three namespace-scoped Deployments on STACKIT SKE plus a Cloudflare Tunnel connector: **Nuxt 4 SSR + Onyx** for the server-rendered shell, map, charts, forecast, plan, and scenario controls; a **Go API** for sensor/series/forecast/staffing endpoints, SSE fan-out, scenario state, and a cached fallback; and a **FastAPI ML service** for `/predict` and `/simulate`, loading a model baked into the image at build time. -The namespace does not allow Ingress, Jobs, CronJobs, cert-manager, or external-dns. We expose the app through a Cloudflare Tunnel, terminate TLS at Cloudflare, and run the batch at build time. The model and fallback JSON are baked into the images; there is no database or PVC. If FastAPI is unavailable, Go serves the cached forecast and labels it. SSE carries scenario changes with a 15-second heartbeat; polling is the fallback. The plan is generated in 42.8 ms locally on v1.1; the contract is under two seconds. +The namespace does not allow Ingress, Jobs, CronJobs, cert-manager, or external-dns. We expose the app through a Cloudflare Tunnel, terminate TLS at Cloudflare, and run the batch at build time. The model and fallback JSON are baked into the images; there is no database or PVC. If FastAPI is unavailable, Go serves the cached forecast and labels it. SSE carries scenario changes with a 15-second heartbeat; polling is the fallback. The plan is generated in 19 ms cold on v1.1; the contract is under two seconds. -The public app is at https://pulse.noelsabia.dev and the API at https://api-pulse.noelsabia.dev. The v1.1 images are 16.9 MB (api), 249 MB (web), and 952 MB (ml). In the 120-client Cloudflare k6 run, 120/120 SSE connections opened and closed with zero connection errors; p95 event latency 1.03 s, p95 scenario latency 194 ms, presenter POST 82.69 ms, 2,760 events over 4m53s. The system runs non-root with resource limits and a read-only root filesystem. The public dashboard is read-only; `/control` uses basic auth. We store no PII or MAC addresses in the application. This is a hackathon deployment: one API replica, no SSO, no HA, no live ingestion. We document those gaps. +The public app is at https://pulse.noelsabia.dev and the API at https://api-pulse.noelsabia.dev. The v1.1 images are 16.9 MB (api), 249 MB (web), and 952 MB (ml). In the v1.1 120-client Cloudflare k6 run, 120/120 SSE connections opened and closed with zero connection errors; p95 event latency 331 ms, p95 scenario latency 646 ms, presenter POST 49.60 ms, over 4m57.9s. The system runs non-root with resource limits and a read-only root filesystem. The public dashboard is read-only; `/control` uses basic auth. We store no PII or MAC addresses in the application. This is a hackathon deployment: one API replica, no SSO, no HA, no live ingestion. We document those gaps. ![Figure 3. System architecture.](figures/fig_architecture.png) @@ -114,7 +113,7 @@ The public app is at https://pulse.noelsabia.dev and the API at https://api-puls ### 5.1 Forecast accuracy -Table 2 reports the 28-day holdout from the generated `metrics.json`. The weather-aware 7-day model reduces MAE by about 19% relative to the no-weather 7-day model (4.08 → 3.32) and by about 39% relative to seasonal naive (5.40 → 3.32). WAPE falls from 44.7% to 27.5%, and R² rises from 0.462 to 0.777. The day-ahead weather model reaches 3.36, 27.8%, and 0.763; the longer horizon is slightly weaker but remains well above the baseline. +Table 2 reports the 28-day holdout from the generated `metrics.json`. The weather-aware 7-day model reduces MAE by about 19% relative to the no-weather 7-day model (4.08 → 3.32) and by about 39% relative to seasonal naive (5.40 → 3.32). WAPE falls from 44.7% to 27.5%, and R² rises from 0.462 to 0.777. The day-ahead weather model reaches 3.36, 27.8%, and 0.763; the longer horizon is slightly stronger (3.32 vs 3.36 MAE) and remains well above the baseline. | Model | MAE | WAPE | R² | |---|---:|---:|---:| @@ -134,7 +133,7 @@ Table 2 reports the 28-day holdout from the generated `metrics.json`. The weathe Weather is the main driver. In the day-ahead ablation, removing it raises MAE 3.36 → 3.96. The holiday flag changes 3.96 → 3.84 (0.12); it is context, not a large lift. The production 7-day model is 3.32 with weather and 4.08 without. These are single-site, 28-day results. -Per-sensor errors vary (Table 3): Stadtgalerie has the highest MAE (5.83); Hagenbuchersee-02 the highest WAPE (31.1%); density-01 the lowest MAE (2.26). The global model is pooled; local errors are not. +Per-sensor errors vary (Table 3): Stadtgalerie has the highest MAE (5.83); Hagenbuchersee-01 the highest WAPE (38.6%); density-01 the lowest MAE (2.26). The global model is pooled; local errors are not. | Sensor | MAE | WAPE | R² | |---|---:|---:|---:| @@ -153,18 +152,18 @@ Per-sensor errors vary (Table 3): Stadtgalerie has the highest MAE (5.83); Hagen | Metric | Value | |---|---:| -| Plan generation latency | 42.8 ms local v1.1 (contract < 2 s) | +| Plan generation latency | 19 ms cold on v1.1 (contract < 2 s) | | Concurrent SSE clients | 120/120 opened and closed; 0 connection errors | -| SSE p95 event latency | 1.03 s | -| SSE p95 scenario latency | 194 ms | -| Presenter POST latency | 82.69 ms | -| Events received / duration | 2,760 / 4m53s | +| SSE p95 event latency | 331 ms | +| SSE p95 scenario latency | 646 ms | +| Presenter POST latency | 49.60 ms | +| Duration | 4m57.9s | | Image sizes (api / web / ml) | 16.9 MB / 249 MB / 952 MB | | Cold deployment time | `[TODO]` | -*Table 4. System metrics from the v1.1 deployment and the 120-client Cloudflare k6 run. Cold deployment time is still `[TODO]`.* +*Table 4. System metrics from the v1.1 deployment and the v1.1 120-client Cloudflare k6 run. Cold deployment time is still `[TODO]`.* -The 120-client Cloudflare run is the measured result: 120/120 connections opened and closed, zero errors, p95 event 1.03 s. The earlier 3-VU smoke test (p95 656 ms) was a pre-check. The plan screen compares the recommended schedule to a flat schedule on coverage and cost under stated assumptions; this is a heuristic comparison, not an ROI claim. +The v1.1 120-client Cloudflare run is the measured result: 120/120 connections opened and closed, zero errors, p95 event 331 ms. The plan screen compares the recommended schedule to a flat schedule on coverage and cost under stated assumptions; this is a heuristic comparison, not an ROI claim. ### 5.4 What the evaluation does and does not show @@ -186,7 +185,7 @@ Passive Bluetooth/Wi-Fi sensing consistently finds a small, biased sample: count ## 8. Conclusion -PulseCast shows that a small, weather-aware global model can turn a noisy inner-city footfall index into a weekly staffing plan that beats a seasonal-naive baseline and runs in 42.8 ms locally on a real deployment. It also shows that the index is not a people counter: each value is a short BLE scan scaled by 0.7, sampled every 15 minutes, with unknown penetration and incomplete coverage. The honest conclusion is narrower and more useful than a city-scale claim: the decision loop works, the relative forecast is credible, and the next step is calibration and a privacy-first sensing layer. We would rather ship a plan a manager can use and state what it does not measure than promise a city-wide heatmap the data cannot support. +PulseCast shows that a small, weather-aware global model can turn a noisy inner-city footfall index into a weekly staffing plan that beats a seasonal-naive baseline and runs in 19 ms cold on a real deployment. It also shows that the index is not a people counter: each value is a short BLE scan scaled by 0.7, sampled every 15 minutes, with unknown penetration and incomplete coverage. The honest conclusion is narrower and more useful than a city-scale claim: the decision loop works, the relative forecast is credible, and the next step is calibration and a privacy-first sensing layer. We would rather ship a plan a manager can use and state what it does not measure than promise a city-wide heatmap the data cannot support. ## Artifacts, data, and AI disclosure