A window is what is left when every rule in data/rules.json has had its say. The Shutters draw one row for each rule in use, across every hour in the file. Each run of hours a rule rules out is a block of ink; an hour with no value in the file for that rule is a hollow block, because no data is not a pass. Where no row has ink, a clear channel runs down the stack. A window, a run of open hours at least as long as the shortest window the rules ask for, is drawn as one: lit, an ink jamb up the stack at each edge and an ink sill under it. An open run that is too short has no frame.
On an hour a rule lets through, a green bar shows how much of that rule’s allowance the hour uses: nothing at the most comfortable value the rule allows, its full 12 pixels exactly at the limit, so a bar is never as tall as a block. An hour’s score is 100 minus the mean of its column’s marks, each counted as a share of those 12 pixels and a block as all of them. The count at the right of a row is the hours that rule rules out; an hour can fail more than one rule, so the counts add up to more than the hours lost.
The Shutters are not a forecast of comfort beyond these rules: an hour no rule blocks is open by these rules and no others. A bar’s height does not say which side of a band an hour is on (too warm and too cold stand the same height); the readout under the Shutters does. Daylight is counted by the hour’s start, as the forecast’s is_day gives it, so a window’s last hour can run past sunset; the readout of that hour prints the sunset. Hours that have ended are drawn faint, left of “now” over the Shutters, and windows start at the current hour. Every hour is told on the forecast place’s own clock.
Weather data by Open-Meteo.com, under CC BY 4.0. The free API is for non-commercial use. The forecast is Open-Meteo's, unmodified; the scores and the ask table beside it are this app's.
open-meteo.com
creativecommons.org/licenses/by/4.0/
Open-Meteo gathers its forecasts from national weather services, among them DWD, ECMWF, NOAA NCEP, Météo-France, JMA, MET Norway and the UK Met Office, each under its own open license; crediting Open-Meteo is the credit their license asks for.
Forecasts are forecasts: the app scores what was predicted, not what happened.
Type: Ysabeau Office by Christian Thalmann (Catharsis Fonts), SIL Open Font License 1.1; a subset is in fonts/ with its license.
Build the Shortcut in PROMPT.md and the app shows where you are.
A Shortcut on the phone asks for its location, fetches the forecast for it and writes it into this app as data/snapshot.json. Nothing here goes online, and the location is never written to any repository; PROMPT.md has the recipe. The app reads both files again whenever it comes back to the screen.
Air quality is left out on purpose, so the app stays one fetch and one file; NOTES.md says what adding it would take.