SilverAzide wrote: ↑
January 28th, 2020, 1:37 am
One annoyance with the weather data is that the "severityCode" style of identifying the type of alert that you are using in your Weather.com skin does not seem to have a 1:1 correspondence to the codes being captured here. The codes in xenium's regexp match the color of the icon they use in the UI, but these are somewhat inconsistent with the type of alert. For example, a "moderate" alert (severityCode 3) could show up as a 2 or 3 in the UI. The "severityCode" also references all sorts of annoying stuff like marine alerts ("Small Craft Advisory", etc.). This data does not seem to ever appear in the data xenium is capturing (fortunately); it also never appeared in wxdata either, IIRC.
The alerts section of my code displays ALL weather alerts on the website.
They are sorted according to the alert level (1 to 4) exactly as on the website.
When there are multiple alerts that have the same alert level, they are displayed based on the importance that TWC considers each to have.
If you notice that my code does not display all the alerts existing on the website, this is because there are 2 versions
of the Weather.com website:
1.The "new" version that uses the new codes.
This version is accessed when you open your browser and go to TWC
2.And the "old" version that uses the old codes for locations.
This version is "hidden" and can be accessed by replacing, at the new version, the long code with the old code in the link.
Between the two versions there are small differences in data display
In case of alerts there may be bigger differences.
There are situations when one version displays more alerts than the other.
So.. when you compare the data of the skin with those of the website, make sure that both use the same type of code for the location.
The biggest weirdness is that an alert can be displayed several times on the website (same text, same validity period).
I don't understand why.