Live data from Hacker News

Show HN: Weather API for non-commercial use

open-meteo.com

51–60 of 154 posts

Re: Show HN: Weather API for non-commercial use

#51
post #49

Do you offer historical data?

Currently only the past 2 days are available. To add more historical data is in the backlog [0]. Do you have an application in mind? Which weather variables over which timeframe?

[0] https://github.com/open-meteo/open-meteo/issues/27

Re: Show HN: Weather API for non-commercial use

#53

Earlier quoted context omitted.

Yes, the API part is using Vapor. But there is not much code that actually relies on Vapor. It is mostly doing request parameter parsing and routing. I use simple 2D lat lon grids for different regions and resolutions. E.g. the global grid uses 2879x1441 pixel grid. The third dimension is time. All data are stored directly as floating points on disk. Because I know the dimensions of the grid, I can read data exactly…

Very cool! Random weird suggestion: you could get very substantial further space savings (2x-16x) by storing the data in a compressed texture format such as ASTC HDR. What makes compressed textures different from other compressed image formats is that they are designed for random access of the compressed data, with fixed size blocks. Compression is lossy but you can choose the compression level to match your data. I…

Thanks for pointing me towards ASTC HDR. I did not know this one. Compression will be an important part to build a longer historic database. I tested zstd, but it only had a ratio of 30%.

Currently I am using fixed size files, because I update all weather data "in-place". I can calculate which bytes to read for a given geographic location. If data is compressed, this would be very hard to do.

Re: Show HN: Weather API for non-commercial use

#54

Earlier quoted context omitted.

Very cool! Random weird suggestion: you could get very substantial further space savings (2x-16x) by storing the data in a compressed texture format such as ASTC HDR. What makes compressed textures different from other compressed image formats is that they are designed for random access of the compressed data, with fixed size blocks. Compression is lossy but you can choose the compression level to match your data. I…

Thanks for pointing me towards ASTC HDR. I did not know this one. Compression will be an important part to build a longer historic database. I tested zstd, but it only had a ratio of 30%. Currently I am using fixed size files, because I update all weather data "in-place". I can calculate which bytes to read for a given geographic location. If data is compressed, this would be very hard to do.

Yes, this is why I suggested compressed textures, they are fixed size too. You know exactly which bytes to read (or write) for any given pixel. But they can still achieve high compression ratios assuming the data is suitable, which I expect weather data is.

Re: Show HN: Weather API for non-commercial use

#56
Your license requirements are unenforceable. App developers can create apps that automate requests against your endpoints without having to agree to your ToS.

Even if you add an account and API key system, as long as it's free to sign up, apps can also automatically register accounts to get API keys.

Re: Show HN: Weather API for non-commercial use

#57

I respect and appreciate no API key being needed, but how will you prevent excessive usage? I'll just say that it's been a battle on my end to stop people abusing APIs I deploy. It's why we can't have nice things.

Limit per IP address?

Re: Show HN: Weather API for non-commercial use

#58

Looks great. What is the funding model for the project? What are the current costs?

There is no funding. Costs are negligible. Currently it is running on a cheap rented VM. Per single VM, it should scale to 3+ million API calls per days easily. To keep it simple, I also do not want to have any income with it. In case larger API consumers are on the horizon, I will contact them and ask to sponsor a couple more VMs.

Reasonable. Thank you for the details!
Post reply on HN