swap / active-swap per ISO week, entire tracked history (2026-02-02 → 2026-09-30), split by first-time vs. repeat tag| Week starting | First-time tags | Repeat tags | Total |
|---|
Method (weekly chart): "Sent to swap" = start of a new episode where gen.maintenance_status (gen_notes.status)
enters swap or active-swap (the two are counted together — plain swap is down
awaiting replacement, active-swap is the same tag while the gen is still carrying load). An episode starts
on the first logged row with a swap status following a non-swap row, per gen. Source: gen_history.db::gen_notes,
replayed via /opt/ngon/apps/generators/gen_swap_metrics.py (the same module behind the Generator Trends
page swap chart), reconciled against the live tag in master_config.json so open episodes reflect current
state rather than a stale log row.
Method (median days to repeat pull, 48.5): among the 60 repeat taggings, 14 are a logging artifact (the swap
tag and the "moved to OOS" note land at the same timestamp, splitting one continuous episode into two) and are excluded
as not a real round trip. For the remaining 46 genuine retags, the gap between the END of one episode and the START of
the next is checked day-by-day against the LOCATION record in gen_status.db::generator_daily_status (the
same daily snapshot behind the OOS charts). Days where that snapshot reads active count as "back in
service"; days reading out_of_service or spare do not. 48.5 is the median of those active-day
counts (mean 62) — i.e. how long a retagged gen was actually deployed before its next swap tag, not raw calendar time
(which runs higher, median 96 days, because units often sit in OOS awaiting repair in between).
Window — why the chart starts 2026-02-02, not the log's true first row: gen_notes itself has rows
back to 2025-09-10, but those early rows are ordinary notes with no swap-status tag attached — the FIRST row anywhere in
the log carrying a swap/active-swap status is the week of 2026-02-02, matching the swap-tracking
module's own documented start date (2026-02-03). The 20 weeks between 2025-09-08 and 2026-01-26 are omitted rather than
plotted as zero, because a flat run of zeros there would read as "no swaps happened" when the true fact is "the tag
wasn't being logged yet." This is the full useful history — there is nothing further back to show.
First-time vs. repeat, TRUE lifetime: a tagging is "first-time" (green) if it is the very first swap-episode start ever logged for that gen_id; any later episode start for the same gen is a "repeat" (yellow) — tagged, came off the tag (resolved in place or actually replaced), then tagged again. Across the full 35-week history: 106 unique gens were tagged at least once (=106 first-time tags), and 41 of those 106 were tagged again at least once, contributing the other 60 repeat tags (166 total taggings).
Average: 166 taggings ÷ 35 weeks (including zero-count weeks inside the tracked range, e.g. 2026-03-23 and 2026-03-30) = 4.7 gens/week. The last bar (week of 2026-09-28) is partial — only 3 days in as of the pull time.
Known gaps in the source: before a logging fix (date not recorded, but visibly in effect before Feb 2026),
gen_history_api only wrote a gen_notes row when the operator also typed note text, so a
silent status flip could leave no trace — counts, especially in the earliest weeks (Feb–Mar 2026), may undercount.
Since the fix, every status change logs a row. This does not affect the "currently open" figures, which are
reconciled against the live tag regardless of log gaps.
This figure is expected to roughly track the Generator Trends page's own swap chart, since both use the same gen_swap_metrics module — if it disagrees, check the module hasn't changed its definition since this page was built.