You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library usage example is wrong. It lacks the required parameter resolution is missing and the hour parameter of query was renamed.
It should be the following:
from datetime import datetime
from dwdweather import DwdWeather
# Create client object.- dw = DwdWeather()+ DW = DwdWeather(resolution="hourly") # Find closest station to position.
closest = dw.nearest_station(lon=7.0, lat=51.0)
# The hour you're interested in.# The example is 2014-03-22 12:00 (UTC).
query_hour = datetime(2014, 3, 22, 12)
- result = dw.query(station_id=closest["station_id"], hour=query_hour) + result = dw.query(closest["station_id"], query_hour)
print(result)
Took me several hours to figure that out. :/
The text was updated successfully, but these errors were encountered:
The library usage example is wrong. It lacks the required parameter resolution is missing and the hour parameter of query was renamed.
It should be the following:
Took me several hours to figure that out. :/
The text was updated successfully, but these errors were encountered: