earthobservations/wetterdienst

API Question: Acquisition interval and weather alerts

Opened this issue · 2 comments

I would like to use the app as a proxy to query the DWD - so I get an easy WEB API and reduce the load on the actual DWD site. I read the docs but I couldn't find all information I was looking for. In particular:

  • How often does this app query the DWD and can I modify it?
  • Can I also get the weather alerts from the WEB API or is this something you do not provide (yet?)
amotl commented

Dear Jens,

thank you for looking into this and also thanks for asking. Let me tell you a bit more about the background of the subsystem you are investigating here: The HTTP API was just a quick shot to accompany the CLI API we added the other day, see #55 and #178. While it might work reasonably already, it should definitively get more love.

Caching and scheduling

In general, we want to improve and refine the situation with this subsystem in order to make it production ready. The details you are talking about resonate very much with that. While we want to provide a convenient and sound general purpose HTTP API, we are also looking at things like #281.

In order to make that possible, we will probably have to improve the current situation with the caching logic, see also #243. The current cache implementation is located at wetterdienst.util.cache. So, this might fit your bill already and will get you an insight into how Wetterdienst already tries to be efficient in order not to hit upstream on each and every request. We will be happy to hear back from you if you think those cache ttl values should be adjusted into any direction to better serve your needs.

Weather alerts

When talking about weather alerts, you are referring to [1]? Our take: In general, yes, we would very much like to also ingest and process this data, but there is no subsystem module available within Wetterdienst yet.

While we haven't been able to add a documentation page about other excellent programs in this area yet, I want to specifically point out Unwetter [2], FOSS Weather [3] and MMM-DWD-WarnWeather [4] here. Beyond weather alerts, there is also Bright Sky [5], which is worth mentioning.

Thoughts

We would very much like to stay in touch in order to improve the situation with the HTTP API of Wetterdienst and might move this into a dedicated discussion thread. Please let us know if you have further questions or ideas.

With kind regards,
Andreas.

[1] https://opendata.dwd.de/weather/alerts/
[2] https://github.com/wdr-data/unwetter
[3] https://github.com/scoute-dich/Weather
[4] https://github.com/LukeSkywalker92/MMM-DWD-WarnWeather
[5] https://github.com/jdemaeyer/brightsky

Wow, just wow. Love this detailed answer! The caching times looks good to me. And the referred alert API [1] is the one I was also thinking about. I will definitely look into your provided links and see if other services will fit. I will stay subscribed to the repo to track progress. I'm not a python developer so I can't really help but I would be happy to test the API as soon as you feel it is ready.