Live data from Hacker News

Open-Meteo is a free and open-source weather API for non-commercial use

open-meteo.com

11–17 of 17 posts

Re: Open-Meteo is a free and open-source weather API for non-commercial use

#14
Hey, I was literally just writing up this example for a DSL I'm working on:

  GET /:city/weather.svg
    |> fetch("https://geocoding-api.open-meteo.com/v1/search?name=" + .params.city + "&count=10&language=en&format=json", {method: "GET"})
    |> jq: `{
      latitude: .data.response.results[0].latitude | tostring,
      longitude: .data.response.results[0].longitude | tostring
    }`
    |> fetch("https://api.open-meteo.com/v1/forecast?latitude=" + .latitude + "&longitude=" + .longitude + "&hourly=temperature_2m", {method: "GET"})
    |> jq: `
      .data.response.hourly as $h |
      [$h.time, $h.temperature_2m] | transpose | map({time: .[0], temp: .[1]})
    `
    |> gg({ "type": "svg", "width": 800, "height": 400} ): `
      aes(x: time, y: temp)
        | line()
        | point()
    `
Thanks for the service, I use it for demos all the time!

Re: Open-Meteo is a free and open-source weather API for non-commercial use

#16
I use it with an excellent Android app Breezy Weather (from f-droid) for a few years now.

It's the best weather data and presentation I ever had. The only solution that is clean and where long term predictions are worth something. Partially because of the data source, partially because of the UI that doesn't bullshit me.

Re: Open-Meteo is a free and open-source weather API for non-commercial use

#17
That's great ! FWIW I generated a small web app (I am just starting to experiment with Claude and Devstral and that seemed a good exercise :), and put it online in case it would be useful https://meteo.karteum.ovh (e.g. during my last trips I used the weather forecasts to refine where I would go more precisely within the country. But I was frustrated as many meteo websites are full of ads...)
Post reply on HN