earthobservations / wetterdienst

Open weather data for humans.
https://wetterdienst.readthedocs.io/
MIT License
354 stars 54 forks source link

deprecated dataset in Geosphere, update needed in endpoint #1286

Open bluearrow98 opened 5 months ago

bluearrow98 commented 5 months ago

Describe the bug Geosphere recently seemed to have updated their dataset resource. I was trying to retrieve the snow depth data in a certain region, however it is shown missing when I access through wetterdienst. On comparing the data directly accessing from Geopshere API, I discovered that the resource used in wetterdienst is deprecated.

To Reproduce Steps to reproduce the behavior:

Request the data:

reqData = GeosphereObservationRequest(
    parameter=GeosphereObservationParameter.SNOW_DEPTH,
    resolution=GeosphereObservationResolution.DAILY,
    start_date='2023-11-22',
    end_date= '2024-04-19'
)

reqData.filter_by_station_id(station_id='87').values.all()

The output I get: Bildschirmfoto 2024-04-30 um 10 42 43

Expected behavior The data is available. But Geosphere seem to have updated their dataset resource. You can find all the list of deprecated resources here: https://dataset.api.hub.geosphere.at/v1/docs/user-guide/resource.html. There is also alternative endpoint name suggested for all those resources.

bluearrow98 commented 5 months ago

By the way, I would love to help contributing to updating this if you are alright with it :)

gutzbenj commented 5 months ago

Dear @bluearrow98 , thanks for reporting the change! It would be great if you setup a PR and I'll guarantee quick merge! Do you need assistance?

bluearrow98 commented 5 months ago

Yes, I am working on it! All the parameters need to be updated as well unfortunately and this is causing some problems. Currently, debugging it. I'll notify you once I update it :)

gutzbenj commented 5 months ago

If you have some pain points that really had troubled you, please let me know and I'll try to add that to the docs!

bluearrow98 commented 5 months ago

Just set up a PR. Noticed that the request function was setting the start_date to be default even when a user gives one (but no end_date). Fixed that as well.

Also, it is painful to see such hardcoded parameter for each resolution haha. I plan to take this up as a small project to automate this somehow ;)