Download Data to a JSON or GeoJSON File

Download Data to a JSON or GeoJSON File

GLOBE’s Application Programming Interface (API) allows end users to query data by date, location, protocol type and much more. The API is intended for users with computer programming skills.

The API is a great option if you want to:

  • Download a large batch of data (more than 50,000 data points)
  • Download the data as a JSON or GeoJSON file
  • Write a script to automatically retrieve the latest data

Access the GLOBE API.

For more documentation about GLOBE data, see the GLOBE Data User Guide (pdf).

API Request Example

Here is one example of how to get data as a JSON file through GLOBE's API — looking for all clouds data from 01 July 2019 to 01 August 2019. This will allow users to work with the JSON (or GeoJSON) data in the analysis or plotting software they normally use.

1. From the GLOBE API interface, click on "GET /v1/measurement/protocol/measureddate/".

Screenshot of GLOBE API interface, with "protocol/measuredate" highlighted

 

2. Click "Try it out".

Screenshot of GLOBE API interface, with "Try it out" highlighted

 

3. Scroll down in the Protocols for search menu and select "sky_conditions". Enter 2019-07-01 as the Start date. Enter 2019-08-01 as the End date (dates must be entered as YYYY-MM-DD). Since the default file format is GeoJSON and this request is for JSON, select FALSE from the geojson dropdown menu. Click "Execute".

Screenshot of GLOBE API interfrace, with various sky_conditions fields highlighted.

 

4. Executing this call returns the Curl, request URL, and a sample of 10 observations is displayed in the Response body. Confirm the data returned in the Response body.

Screenshot of data sample in the API response body to review

 

5. To retrieve the full desired dataset, copy and paste the Request URL into a new browser window. After pasting the URL, change "sample=TRUE" to "sample=FALSE" and begin the search.

Screenshot of a browser window, with the URL text that needs to be updated highlighted.

 

6. All GLOBE clouds data from 01 July 2019 to 01 August 2019 will be returned in JSON format in the browser window. Selecting Raw Data > Pretty Print makes it easier to read the data on the screen (Firefox).

Screenshot of JSON data.

 

7. A search for “dust” shows GLOBE clouds observations reporting dust.

Screenshot of JSON data, with skyconditiondust highlighted.

 

8. To download the data, click Save and choose your file name and desired location.

Screenshot of JSON file, with save button highlighted.