Hacker News new | past | comments | ask | show | jobs | submit login
Norwegian Meteorological Institute has an excellent free weather API (yr.no)
169 points by notpushkin 86 days ago | hide | past | favorite | 36 comments

They have a lot of cool stuff. For instance I made this small script to instantly detect nearby lightning strikes without having to look at their map.[1]

I use it to alert me when I need to turn off sensitive equipment. Caveat: It only works in the Nordics. Or, well, it'll probably work outside the Nordics as well, but it's kinda pointless if you don't live there lol.

1: https://gist.github.com/kebman/0d624a9d22c754658b6eee53eab95...

The eink dashboard project I'm using[1] has an option to get weather from Metno, what I like about their API is that the only "API key" required is passing a contact email address in the user agent so they can notify you of any problems, abuse, or breaking changes etc.[2] so to me it feels like an honour system.

Of course only time will tell whether this generosity is abused and they have to lock it down.

1: https://github.com/mendhak/waveshare-epaper-display


In Home Assistant the default 'met' platform uses Met.no. According to the docs it "was introduced in Home Assistant 0.79, and it's used by 67.9% of the active installations."


works great but has a couple of limitations compared to darksky. For example I couldn’t find a badge showing percipitation probability or even humidity (there’s one badge for everything?). The hourly forecast is disabled by default for some reason. luckily easy to enable once you know about it.

I‘m not sure how this is relevant to the post, but just mentioning that the 67,9% just indicates that this much installations are using this integration (met). Since this is the default weather provider in HA and everybody wants weather the high percentage makes sense.

In addition to stuff like running this open API, they also provide free and openly available weather modelling and forecast for southern Africa.

To me this feels like one of the best examples of how to provide aid for developing countries, by giving them information that enables everyone from fishers and farmers to governments to make better decisions.

Actually 2 / 3 of all users for Yr are from outside Norway


Wendover did a nice video of how this data is collected.


At about https://youtu.be/V0Xx0E8cs7U?t=36 in that video, an equivalence is made between "one hundred thousand feet" and "three hundred thousand meters". I replayed it a few times to check.

Interestingly only the spoken text makes that mistake, the subtitles are correctly stating 30.000 meters.

I wonder how does it compare to "wttr.in". They apparently use WorldWeatherOnline for source.

Also heads up, the NMI provides a nifty dashboard available as pdf and svg:


From my perspective as a Swede I've never been satisfied with any international weather API. I've completely lost faith in them.

For years now I've only used the official Swedish meteorological institute (SMHI) app. It used to suck so bad that a lot of Swedes used the Yr app or the Danish DMI app. But it's been vastly improved.

Kind of the same in the Netherlands. There’s a website buienradar.nl where you can see the clouds movement and you can see in advance when it’s going to rain on you, which for me is the most relevant weather fact.

As far as I know there's a lot of cooperation between the Nordic weather institutes to make their predictions work better. Certainly one example are the weather radars which seem to be standardized and connected in the Nordics.

And they also have a wonderful mobile weather app, also called "yr"!

Which, at least for the Oslo area, offers more reliable predictions than Apple's weather app (which is always weather.com, afaik) Having said that, and having the Norwegian Meteorological Institute down the road from where I live, their local predictions are often completely off on rain, to the point I always bring a raincoat when going out.

I prefer the weather radar for that. Actual clouds and the live direction they're going in is a great predictor of rain. In fact I'd love to improve lightning detection by making a script that also takes into account wind direction, since lightning tends to travel with clouds. It could be as easy as using an ellipsis directed as a kind of weather vane, perhaps stretching out with wind speed. Currently I use a simple circular distance calculation to detect proximity.

For local rainfall predictions, the best solution is to look at the weather radar service they have.

Came here to say this, I love the app, it has the nicest UI of all the weather apps I’ve tried and seems fairly accurate. I was tipped off about it by friends in a ski resort who say it’s the most accurate for them in terms of predicting snowfall, bluebird days etc.

Unfortunately it doesn’t give “next hour” precipitation info for the UK though so I use AccuWeather for this… but find Yr much clearer for longer range weather.

Beware, the Android version forces you to activate Google Play Services

Where do they get their data from? Do the various national weather agencies share data with each other?

> Do the various national weather agencies share data with each other?

Yes, via a UN body called World Meteorological Organization. They have 193 members, only missing a dozen or so island nations.

Does that mean all weather apps have the same source data?

Very much no. A lot of them are, somewhat sadly but predictably, targeted at larger markets and therefore pull data from NOAA for the US, the UK Met, and the German weather service (DWD), etc. but then fill in the gaps with something like NOAA that will provide predictions for everywhere in the world.

You also quickly get into different models that are used by different services, usually because they work better in the specific environment they're targeting. For instance, Estonia and Finland, possibly with some others, collaborate on their own weather model that works pretty well in the Baltics. There are also highly-regarded models like the ones provided by ECMWF that are only available for a fee, so a lot of apps won't include them, instead preferring to simply use NOAA because it's free for everywhere.

Am I to understand that they share sensor data, but then apply their own models for forecasting?

Also doesn't necessarily mean that they incorporate anyone else's sensor data into their own models. Estonia, for instance, is so small I suspect they only feed their data, they don't pull anyone else's.

I can't imagine even the likes of Apple with their WeatherKit want to have to deal with installing and maintaining their own physical meteorological sensors in every country.

I don't know about installation of physical devices, but it'd be cool to see Big Tech teaming up with the weather folks for developing mesh protocols, analytical techniques, data optimizations, etc. Or maybe that's all done already? I dunno. Kinda like how IBM owns the Weather Channel.

The last time I looked at it, they wanted to artificially limit the number of people using it, by doing all the developer documentation just in Norwegian.

I see that’s no longer the case and all docs are in English.

edit: I guess my memory is wrong, because all the archive.org API docs websites are in English.

You should take it as a nice bonus if they publish their docs in English rather than as a given, especially when it's free and from a country where English is not the language.

I'm still a bit surprised these weren't available in English.

It isn't the language of the country, but children start learning it at age 6. A lot of masters and PhD courses are taught in English, and some workplaces use it quite a bit, especially if they do collaborations with other countries. This would fall in that last category. I can find a lot of information from the government in English, and all of my immigration paperwork was in English - they don't require you to further translate into Norwegian.

I can mostly get by using English, but Norwegian is needed to integrate and it makes a social life easier. norwegian is necessary for most jobs, though.

Edit: To illustrate it even more: Graffiti is in english half of the time and Norwenglish exists.

My four year old cousin speaks English fluently. It's even a little eery to listen to, since she's got an all-Norwegian family and they've never lived abroad. It's of course due to screen time with various English series and games.

> a country where English is not the language

You'd be surprised if you ever visit. ;) In any case, Google Translate works reasonably well our written language, but you'll probably struggle with what's spoken.

[edited out due to further explanations]

I don’t understand what you mean.

Maybe my memory is wrong, it was a long time ago.

But I really remember they even wrote explicitly it’s to limit people from using it, or something similar.

If I had time now I would look into web archive to check if my memory is not deceiving me

Annoying part is that tide & current prediction comes from Kartverket.no and those two Government Offices cannot combine information. Issues are very much related.

Applications are open for YC Winter 2023

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact