Open drmrbrewer opened 4 years ago
You can use the following workaround to obtain the station_id of the closest station to your input lat and lon.
import pandas as pd
from dwdbulk.api import observations
resolution = "10_minutes"
parameter = "air_temperature"
df_stations = observations.get_stations(resolution,parameter)
lat, lon = .., ..
df_stations["delta_lon_lat"] = (df_stations.geo_lon - lon).abs() + (df_stations.geo_lat-lat).abs()
df_stations.sort_values(by="delta_lon_lat", inplace=True)
station_id = df_stations.station_id.iloc[0]
This library looks promising, thanks!
Is it possible to do a forecast data lookup based on latitude, longitude? I can't see anything in the examples... it would be something similar to what is in
In [1]
toIn [3]
of this page but using lat/long rather than e.g. "Berlin".