LasseRegin/dmi-open-data

Allow access to DMI's "Climate Data" Service

Closed this issue · 1 comments

Feature request:
Implement support for the climate data service (such as queries of annual statistics)

For my own purposes, I made a simple implementation as a subclass of DMIOpenDataClient. I changed the URL

_base_url = "https://dmigw.govcloud.dk/{version}/climateData" 

and then implemented a new function:

def get_climate(self, parameter=None, station_id=None):
    res = self._query(
        service="collections/stationValue/items",
        params={
            "parameterId": parameter,
            "stationId": station_id,
            "timeResolution": "year",
        },
    )

But there is probably a better way to integrate this functionality into the mainline of code.

Hi @pdo-be , thank you for your issue/feature request.

Please see the newest version 0.1.2 for support for climate data.

See the latest commit for implementation details.

Finally feel free to open a Pull Request for any similar feature request going forward :-)