DMI’s open data is retrieved in JSON format (”JavaScript Object Notation”).
You are able to import the JSON response of an API query directly into newer versions of Excel by following the guide below.
From Excel data can easily be saved in .csv format.
If you want to convert JSON directly into a .csv file several "JSON to CSV converters" can be found online.
Step | Action | Screen dump |
---|---|---|
1 | Open Excel and click the Data tab | |
2 | Click New Query > From Other Sources > From Web | |
3 |
Enter your DMI open data query in the URL text field and press OK (Remember to include your api-key in the query) |
|
4 | Click Into Table (on the convert tab) | |
5 |
Right click the value of "features" (List) Click Drill Down |
|
6 | Click To Table | |
7 | Click OK | |
8 | Click the button with left and right arrows | |
9 |
Uncheck "use original column name as prefix" Click OK
|
|
10 | Click the button with left and right arrows at the top of the "geometry" column. | |
11 |
Click the button with left and right arrows at the top of the "coordinates" column. Click Extract Values (you can also choose "Expand to New Rows". This will give you two identical rows for each observation. One row for latitude coordinates and one for longitude). |
|
12 |
Select a delimiter from list for concatenating the coordinates Press OK (In this example we chose semicolon as the delimiter) |
|
13 |
Click the button with left and right arrows at the top of the "properties" column Press OK in the the window that appears |
|
14 | Click Close and Load to finalise the import process. |