panodata / dwdweather2

Python client to access weather data from Deutscher Wetterdienst (DWD), the federal meteorological service in Germany.
https://community.panodata.org/t/dwdweather2-a-python-client-to-access-weather-data-from-deutscher-wetterdienst-dwd/98
MIT License
72 stars 13 forks source link

Getting data for a list of N closest stations #25

Closed antjefitzner closed 4 years ago

antjefitzner commented 4 years ago

Hi,

I want to get a list of the x nearest stations (and not just the closest). How can I do this? It seems in the command line this is possible, but I am using the library. Am I missing it or is it not possible yet?

Just some context: I want to get the e.g. 3 closest stations that have data for e.g. wind speed around a given point.

TIA Antje

amotl commented 4 years ago

Dear Antje,

thanks for writing in. Your request sounds familiar. See also #3, #14 and #16 which might help you along. Please let me know about the outcome for you.

With kind regards, Andreas.

antjefitzner commented 4 years ago

Hi Andreas,

my colleague actually looked it up in your code. Adding "surrounding" worked like:

closest_stations = dwd.nearest_station(lon=longitude, lat=latitude, surrounding=radius)
amotl commented 4 years ago

Dear Antje,

thanks! I also would like to note that Wetterdienst also provides this feature through both https://github.com/earthobservations/wetterdienst/pull/23 and https://github.com/earthobservations/wetterdienst/pull/99.

With kind regards, Andreas.

cc @JohannesRol, @stianchris, @ugur175, @meteoDaniel, @gutzbenj