Download Data to a JSON or GeoJSON File - Clouds Protocol
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
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/".
2. Click "Try it out".
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".
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.
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.
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).
7. A search for “dust” shows GLOBE clouds observations reporting dust.
8. To download the data, click Save and choose your file name and desired location.