Climate Data API

Click here for Swagger - Interactive API explorer (external site)

To execute calls the service input your api-key by clicking the "Authorize" button in Swagger

 

Quick start examples

Example: https://dmigw.govcloud.dk/v2/climateData/collections/stationValue/items?api-key=<api-key>

Description: Will return up to 1000 (the default limit) stationValue data elements

 

Example: https://dmigw.govcloud.dk/v2/climateData/collections/station/items?api-key=<api-key>

Description: Will return up to 1000 (the default limit) stations

 

Example: https://dmigw.govcloud.dk/v2/climateData/collections/station/items?api-key=<api-key>

Description: Will return up to 1000 (the default limit) stations

 

The collection endpoints support a number of query parameters to filter or sort data. Make sure to read the query primer to make use of the below query parameters.

 

Example Response


		{
  "type": "FeatureCollection",
  "features": [
    {
      "geometry": {
        "coordinates": [
          12.6455,
          55.614
        ],
        "type": "Point"
      },
      "id": "00030893-5544-4655-a60c-0f49c58a0a99",
      "type": "Feature",
      "properties": {
        "calculatedAt": "2023-10-26T09:05:16.147000+00:00",
        "created": "2023-10-26T09:05:23.250959+00:00",
        "from": "2023-10-26T08:00:00+00:00",
        "parameterId": "mean_wind_dir",
        "qcStatus": "none",
        "stationId": "06180",
        "timeResolution": "hour",
        "to": "2023-10-26T09:00:00+00:00",
        "validity": true,
        "value": 55.0
      }
    }
  ],
  "timeStamp": "2023-10-26T09:27:48Z",
  "numberReturned": 1,
  "links": [
    {
      "href": "https://dmigw.govcloud.dk/v2/climateData/collections/stationValue/items?sortorder=from,DESC&limit=1",
      "rel": "self",
      "type": "application/geo+json",
      "title": "This document"
    },
    {
      "href": "https://dmigw.govcloud.dk/v2/climateData/collections/stationValue/items?sortorder=from,DESC&limit=1&offset=1",
      "rel": "next",
      "type": "application/geo+json",
      "title": "Next set of results"
    }
  ]
}
	

API

/collections

Example: https://dmigw.govcloud.dk/v2/climateData/collections

Description: Will return all available collections in the API. Available collections:

  • station
  • stationValue
  • municipalityValue
  • 10kmGridValue
  • 20kmGridValue
  • countryValue

 

/collections/<collection name>/items

Query parameters:

Query examples

Examples:

Returns station values within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight (both dates are inclusive), and within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark), returning a maximum of a 100 objects skipping the first 1000.

 

Returns station values within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight (both dates are inclusive), and limited to the station having the id "06149" and the parameter having the id "mean_temp", returning a maximum of 20000 objects in total sorted by the "from" time in descending order

 

Returns stations having the type "Pluvio" and was "Active" sometime in the month of November 2020 (but not necessarily the whole month) and is within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark)

 

Returns mean_temperature values calculated over the 30 years period 1991-2020 for the months Januar-December, the seasons DecJanFeb, MarAprMay, JunJulAug and SepOctNov and the Annual average over 30 years giving a hit of 17 values.

 

Returns mean_temperature values calculated over the 10 years period, 1991-2020 for the municipality 0580, 'Abenraa', which can be found here: https://dmidk.github.io/Climate-Data-Grid-Map/ (external site).
Note that as we currently have municipality values only for the decade 1991-2020, a datetime specification is not needed.

 

Response schema

Overall Structure

The API is an OGC API - Features API and follows this standard as documented here: http://docs.opengeospatial.org/is/17-069r3/17-069r3.html (external site).

Data is returned in a FeatureCollection object that describes the returned data-set. Data points are found in the features field which contains a number of Feature objects as described below.

 

FeatureCollection

Features are wrapped in a GeoJSON FeatureCollection (external site), which include:

Generic fields for every Feature

stationValue

This is a GeoJSON feature (external site) and the table below describes the returned data:

Station

This is a GeoJSON feature (external site) and the table below describes the returned data:

countryValue

This is a GeoJSON feature (external site) and the table below describes the returned data:

municipalityValue

This is a GeoJSON feature (external site) and the table below describes the returned data:

10kmGridValue

This is a GeoJSON feature (external site) and the table below describes the returned data:

20kmGridValue

This is a GeoJSON feature (external site) and the table below describes the returned data:

Viden om vejr og klima

Se alle