Weathericon

NAME

Weathericon - collection of weather icons.

DESCRIPTION

This is a redesigned set of icons, meant to be used in conjunction with Locationforecast/2.0. They are available in PNG, SVG and PDF formats.

The icons are not meant to be called on demand like earlier versions, but to be downloaded as a gzipped TAR archive and packed with your application. This will result in better performance and minimize API traffic.

The original icons as used on yr.no can be found on https://github.com/YR/weather-symbols/.

Note: There is a typing error in lightssleetshowersandthunder and lightssnowshowersandthunder (extra "s" after "light"). Unfortunately, correcting this would mean breaking existing applications, so it has been postponed to the next version of weathericon/locationforecast.

Variants

Some symbols come in three different variants, for day, night and polar twilight respectively. Others (the ones without sun or moon) are constant during the day. Locationforecast/2.0 will specify the correct variant to use for each hour.

Algorithm

You can potentially try to reconstruct the weather icons in the API from the locationforecast data. A description of the symbolalgorithms is too long to document and support officially, but you can have a look at the source code here if you are interested: https://github.com/metno/weather_symbol.

List of symbols

CodeOld idDescriptionIcons
clearsky1Clear sky
cloudy4Cloudy
fair2Fair
fog15Fog
heavyrain10Heavy rain
heavyrainandthunder11Heavy rain and thunder
heavyrainshowers41Heavy rain showers
heavyrainshowersandthunder25Heavy rain showers and thunder
heavysleet48Heavy sleet
heavysleetandthunder32Heavy sleet and thunder
heavysleetshowers43Heavy sleet showers
heavysleetshowersandthunder27Heavy sleet showers and thunder
heavysnow50Heavy snow
heavysnowandthunder34Heavy snow and thunder
heavysnowshowers45Heavy snow showers
heavysnowshowersandthunder29Heavy snow showers and thunder
lightrain46Light rain
lightrainandthunder30Light rain and thunder
lightrainshowers40Light rain showers
lightrainshowersandthunder24Light rain showers and thunder
lightsleet47Light sleet
lightsleetandthunder31Light sleet and thunder
lightsleetshowers42Light sleet showers
lightsnow49Light snow
lightsnowandthunder33Light snow and thunder
lightsnowshowers44Light snow showers
lightssleetshowersandthunder26Light sleet showers and thunder
lightssnowshowersandthunder28Light snow showers and thunder
partlycloudy3Partly cloudy
rain9Rain
rainandthunder22Rain and thunder
rainshowers5Rain showers
rainshowersandthunder6Rain showers and thunder
sleet12Sleet
sleetandthunder23Sleet and thunder
sleetshowers7Sleet showers
sleetshowersandthunder20Sleet showers and thunder
snow13Snow
snowandthunder14Snow and thunder
snowshowers8Snow showers
snowshowersandthunder21Snow showers and thunder

USAGE

/data

This will download a gzipped TAR archive of all icons in all formats.

    https://api.met.no/weatherapi/weathericon/2.0/data

/legends

This will return a JSON structure with textual explanations for each code in various languages, as well as the old numerical symbol id used by previous versions of Locationforecast.

    https://api.met.no/weatherapi/weathericon/2.0/legends

LICENSE

The weather icons are copyright (c) 2015-2017 Yr and licensed under the MIT License.

See https://github.com/YR/weather-symbols/blob/master/LICENSE for more information.

Change log

version 2.0 released, 2020-06-17

New icon set launched together with Locationforecast 2.0

version 2.0 beta, 2020-02-11

New, redesigned icons now using mnemonic codes instead of numbers (and arithmetic!).

version 1.1, 2014-05-20

New version 1.1 is available
More symbols are added
image/svg+xml is now valid content_type
Version 1.0 is available until 2014-10-06