-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for all weatheralerts event types #243
Comments
Great job @andrea-fantini ! So I was working on the same thing but you beat me to it! FYI There is official documentation of the NOAA CAP standards for emergency alerts at: Here are some minor suggestions to tweaks to your list and to the associated MeteoalarmEventType:
For Event Levels, there also needs to be additions for:
You were able to capture some of the codes that actually aren't standards which is great. Apparently some NWS offices are not complying with the CAP standards... but go figure. |
Thank you @andrea-fantini and @inguy24 for great reaserch! I've closed all of the duplicate issues with weatheralerts and they are now pointing here. I will try to implement your finding in #250 and we will see how much coverage it will have. |
Yes, that's indeed the case. It's how we determine the event level (yellow / orange / red). There are some edge cases I've tried to fix. I've come up with new event-level mapping: return {
Warning: MeteoalarmLevelType.Red,
Statement: MeteoalarmLevelType.Orange,
Watch: MeteoalarmLevelType.Orange,
Advisory: MeteoalarmLevelType.Yellow,
Alert: MeteoalarmLevelType.Yellow,
Emergency: MeteoalarmLevelType.Red, // Local Area Emergency
Danger: MeteoalarmLevelType.Red, // Extreme Fire Danger
Message: MeteoalarmLevelType.Orange, //Civil Emergency Message
Outage: MeteoalarmLevelType.Orange, // 911 Telephone Outage.
}; I think it should cover all of these pesky events that don't fit into a standard warning, watch, statement, or advisory schema. Did you find any other edge cases that've missed? |
Is your feature request related to a problem? Please describe.
The list of supported alert types for the integration weatheralerts is not comprehensive. This leads to a game of wack-a-mole with multple reports of unsupported alert types as they occur. (ex. #240 #233)
Describe the solution you'd like
Expand the current list of supported alert types to be more comprehensive. To facilitate the job I did my best to collect and organize the relevant events and levels.
Event Types
Event Levels
Additional context
I started from the realization that the Hydrologic Outlook in my area was not handled properly and I ended up going down a massive rabbit hole. I feel like the feature is 90% there but I honestly don't know and understand the codebase enough to know if the remaining 10% is within my reach, therefore instead of a PR here is a feature request with hopefully most of the leg work done.
I grabbed and cleaned a list of possible event types from the weather.gov website and provided the spreadsheet that I used for most of the string manipulations.
Here are the steps I performed:
from https://alerts.weather.gov/search I extracted all the possible event drop-down options

extracted the list of options from the page HTML, cleaned and imported all the event options in the attached spreadsheet.
I think the weatheralert.ts code assumes that the last word is the alert level and so I based my data manipulation on this assumption. this leaves out some edge cases that I did not handle. Maybe someone with more understanding of the code can provide a solution also for these few edge cases.
in the spreadsheet attached I did some data manipulation to extract the alert type and level
weatheralerts event types and levels.xlsx
finally, I attempted to map it to the existing
MeteoalarmEventType
andMeteoalarmLevelType
Please let me know if there are any questions.
The text was updated successfully, but these errors were encountered: