Closed eklem closed 3 years ago
Need longtitude and latitude for Vålerenga.
Explanation on what is light rain, rain and heavy rain: https://hjelp.yr.no/hc/no/articles/115003696813-Hva-er-grensene-for-lett-og-kraftig-nedb%C3%B8r-
XML explanation: https://hjelp.yr.no/hc/no/articles/360009342833
So, previous URL for 6 hour blocks forecast and thus one for rain next 90 minutes: https://api.met.no/weatherapi/nowcast/0.9/documentation
The yr.no API for 6 hours seems easier to use. More direct connection to weather icons. https://www.yr.no/sted/Norge/Oslo/Oslo/Oslo/forecast.xml
I may get some explanation to when to show a sleet symbol from Yr.no on Twitter.
So, to sum it up so far:
Try D3.js for drawing possibility of rain or snow next 90 minutes. Or maybe Vega? Seems no real real programming needed.
Seems there is now a JSON api (version 2.0): https://api.met.no/weatherapi/locationforecast/2.0/?lat=60.10&lon=9.58
Met.no has changed their format from JSON to XML, so need to convert it. This library may work: xmlToJSON?
So, use fetch() to get the XML, covert it to JSON and store as a Vue data object and display what I need.