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
@JohannesRol follows a more object-oriented library interface approach with his dwdopendata package. There, you will create a location object from a factory function obtaining the geolocation and subsequently be able to invoke appropriate methods on that object for acquiring actual weather information.
We like that approach, so it would be nice to see a similar interface here.
Original example
importdwdopendataasdwd# Acquire location object from coordinates of nearest station.location=dwd.location(51.898, 8.9876)
# Acquire wind speed data for specific location and time range from specified resolution dataset.wind_speed=location.wind('2019-05-01T00:00:00', '2019-05-02T00:00:00', '10min')
The text was updated successfully, but these errors were encountered:
fromdwdweatherimportDwdWeather# Create main application object with given resolution dataset.dwd=DwdWeather(resolution='10_minutes')
# Acquire station object by looking up nearest station by given coordinates.station=dwd.nearest_station(latitude=51.898, longitude=8.9876)
# Acquire wind speed data for specific location and time range.wind_speed=station.wind(dtstart='2019-05-01T00:00:00', dtend='2019-05-02T00:00:00')
Rationale
As finding the appropriate station depends on the resolution dataset (hourly, 10_minutes, etc.), this information must be available to the machinery before performing any station lookup.
@JohannesRol follows a more object-oriented library interface approach with his dwdopendata package. There, you will create a location object from a factory function obtaining the geolocation and subsequently be able to invoke appropriate methods on that object for acquiring actual weather information.
We like that approach, so it would be nice to see a similar interface here.
Original example
The text was updated successfully, but these errors were encountered: