yr-forecast
Get the forecast for a geographic location from Yr, the weather service by Norwegian Meteorological Institute and the Norwegian Broadcasting Corporation. All the data is gathered from different API endpoints thats publicly available from this page (api.met.no).
Please read the conditions for usage here before starting using this module!
Installation
$ npm i yr-forecast
Usage
Get forecast for a location
This returns a full forecast for one location, that is, a forecast with several parameters for a nine-day period.
The parameters are temperature, wind speed, wind direction, pressure, precipitation, cloudiness, fog, lowClouds, mediumClouds, highClouds and humidity.
Example
const yr = const lat = 592667259const lon = 104045301 const forecast = await yr
Returns
Get precipitation forecast for a specific place
This returns the forcast for the next two hours.
The output is precipitation with unit mm/h. Currently only the area where we have radar coverage is supported. If the requests is outside the supported range, an error is thrown.
Example
const yr = const lat = 592667259const lon = 104045301 const forecast = await yr
Returns
Get text forecast for location
Get text forecasts for land areas in Norway. Land forecasts are currently only issued in Norwegian.
Example
const yr = const lat = 592667259const lon = 104045301 const forecast = await yr
Returns