Closed nmlorg closed 4 days ago
Since #80 went live, 49 alerts have been processed by the bot. Unfortunately, api.weather.gov
(and alerts-v2.weather.gov
) seem to expire records pretty aggressively, so only the following 14 are still viewable (all had status=Actual
and category=Met
):
id | messageType | severity | certainty | urgency | event | response | instruction |
---|---|---|---|---|---|---|---|
3960241-3364815 | Update | Moderate | Likely | Expected | Winter Weather Advisory | Execute | ... |
3960620-3365123 | Update | Moderate | Likely | Expected | Winter Weather Advisory | Execute | ... |
3961136 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3961794 | Alert | Unknown | Possible | Future | Hydrologic Outlook | Monitor | None |
3963421-3367361 | Alert | Severe | Possible | Future | Flood Watch | Prepare | ... |
3964821-3368352 | Update | Severe | Possible | Future | Flood Watch | Prepare | ... |
3965155-3368578 | Update | Severe | Possible | Future | Flood Watch | Prepare | ... |
3965324-3368680 | Update | Severe | Possible | Future | Flood Watch | Prepare | ... |
3965613 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3965873-3369046 | Update | Severe | Possible | Future | Flood Watch | Prepare | ... |
3966591 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3967196 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3968032 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3968722 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
It's hard to determine exactly what the bot should be doing based on this data. For example, I would argue that NWS-IDP-PROD-3965613 should have definitely been posted, but all of the followups for WAZ558 (NWS-IDP-PROD-3966591, which was briefly live concurrently with 5613; NWS-IDP-PROD-3967196; NWS-IDP-PROD-3968032; and NWS-IDP-PROD-3968722) should have been suppressed. However, their primary features are identical:
id | messageType | severity | certainty | urgency | event | response | instruction |
---|---|---|---|---|---|---|---|
3965613 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3966591 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3967196 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3968032 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
3968722 | Alert | Moderate | Observed | Expected | Special Weather Statement | Execute | None |
and none of them include a references
list (which is consistent with them all being labeled messageType=Alert
), so it becomes something more like keeping track of advisories and preventing posts that overlap an active (or reopen a recently active) one. (3966591 was posted while 3965613 was still active, while 3967196 was posted within an hour of 3966591 expiring, 3968722 was posted within an hour of 3968032 expiring, and 3968032 was posted more than an hour after 3967196 had expired.)
Going back to filtering alerts, it appears this label of "Special Weather Statement" is an alternative form of "Significant Weather Advisory", and this text is actually structured. It might make sense to actually just extract the last word of event
and only post when it matches "Warning" (possibly after canonicalization). (Though it might be the case that a label of "Watch" necessarily means urgency=Future
, "Advisory" (or "Outlook", or "Special Weather Statement") means severity<=Moderate
, etc.—again, I wish I had more data.)
More alerts:
id | messageType | severity | certainty | urgency | event | instruction |
---|---|---|---|---|---|---|
3969721 | Alert | Moderate | Observed | Expected | Special Weather Statement | None |
3969740-3371513 | Alert | Moderate | Likely | Expected | Dense Fog Advisory | If drivin… |
3969972-3371675 | Update | Moderate | Likely | Expected | Dense Fog Advisory | If drivin… |
3970041-3371724 | Alert | Moderate | Likely | Expected | Dense Fog Advisory | If drivin… |
3970132-3371798 | Update | Moderate | Likely | Expected | Dense Fog Advisory | If drivin… |
3970277-3371882 | Update | Moderate | Likely | Expected | Dense Fog Advisory | If drivin… |
3970377-3371943 | Alert | Moderate | Likely | Expected | Beach Hazards Statement | A Beach H… |
3970415-3371975 | Alert | Moderate | Likely | Expected | Dense Fog Advisory | If drivin… |
Right now (see #80), anything that shows up in the US NWS' API for a given zone is displayed. https://api.weather.gov/alerts/active?zone=WAZ558, for example, currently lists:
which is not super urgent (or useful).
Each alert (or "feature") includes a
messageType
,category
,severity
,certainty
,urgency
, andresponse
. These seem to correlate with the similarly named fields in Common Alerting Protocol Version 1.2:category The code denoting the category of the subject event of the alert message (REQUIRED) (1) Code Values:
(2) Multiple instances MAY occur within an <info> block.
responseType The code denoting the type of action recommended for the target audience (OPTIONAL) (1) Code Values:
(2) Multiple instances MAY occur within an <info> block.
certainty The code denoting the certainty of the subject event of the alert message (REQUIRED) (2) Code Values:
(3) For backward compatibility with CAP 1.0, the deprecated value of “Very Likely” SHOULD be treated as equivalent to “Likely”.
It might make sense to do something like: If a message has
urgency=Immediate
orExpected
, post immediately; ifurgency=Future
, maybe only post as part of the daily announcement. However, it would be simpler to keep the posting behavior uniform but allow admins to filter events based onseverity
(maybe the default could be changed to excludeMinor
or evenModerate
, since the current landslide warning is set at that).In addition/alternatively, it might make sense to simply ignore features that don't include an <instruction> string (as the landslide warning does not):
It might even make sense to prioritize/only show the instruction in the text posted to the group. (Currently, the bot posts the first 250 characters of the combined
description
,instruction
, andareaDesc
.)