Theil-Sen estimated median change in rain normalised soil moisture 2001-2016, Indonesia

Map: Theil-Sen estimated median change in rain normalised soil moisture 2001-2016, Indonesia

OSSL explorer API

Introduction

This post is a quick manual for how to access data from the Open Soil Spectral Library (OSSL) via the OSSL API explorer. A short general introduction and links to other OSSL recourses can be found in the previous post.

OSSL API

The online API contains two entries, 1) an Engine for entering data into the database and 2) an Explorer for searching and retrieving data.

OSSL Explorer

Open the OSSL Explorer. The application might take a while for the data to load.

OSSL loading data on startup.

When loaded, the OSSL explorer opens with the main window showing Geographic distribution of data. The main view is, however, partly covered and you have the option to scroll over the latest set of tweets related to OSSL. Close the tweets window to continue. If you want to see the tweets again, click the little twitter bird in the top menu.

Many tweets contain links to interesting applications.

There is also an information window. Close it when finished with it. If, for any reason, you want to read the information again, click the little info symbol in the top menu.

OSSL information window.

map-layer-icon

To change the background map, click the map layer icon in the top right corner of the map area.

Change the background map.

nr-datasets

In the lower left corner of the map (Below South America if you have the global default view) you can see the number of samples and spectra available. The spectral data is divided into visible (V or VIS) plus Near InfraRed (NIR) (summed as VNIR), and Mid InfraRed (MIR). The number of geographic data points in September 2022 was 114619, with NIR and MIR contributing roughly equal sites.

data-selection

On august 1, 2023 the number of total samples are instead reported to be 88867. A novel dataset has then also been added - the NIR NeoSpectra encompassing 1760 sample sites over the USA. NeoSpectra is an advanced handheld NIR field spectrometer (1350 - 2500 nm) developed by the company SI-ware. At time of writing this post a NeoSpectra scanner is prized at $6950 excluding accessories.

data-selection

Data selection

In the Data selection window you can add search requests both related to geographic regions (interactively on the map or by stating a country), to different soil and sample attributes and to different datasets.

Geospatial selection

geospatial-selection

If you select the Geospatial option in the Data Selection window you have the options to draw a region on the map or select a nation. The map below shows the result when searching for data in country = Uganda.

Datasets returned with search set to nation = Uganda.
Attributes selection

attribute-selection

The Attributes selection option can be used for selection soil textures. You can chose the soil texture class to select from a drop-down menu by clicking the text field for Soil texture. Search multiple classes by sequentially clicking the options in the drop-down menu. The classes are not globally harmonized thus the classification depends on the geographical region.

Dataset selection

dataset-selection

In a similar manner you can also select the source dataset(s) to search.

Soil properties selection

The last option is to select a subset of data using soil properties criteria. When you click the Soil properties button in the Data selection window, the main view will switch from Geography to Soil properties. In the Soil properties view you can select and view the distribution of up to 4 different properties for the present geographic search.

Exploring the distribution of soil properties in the Soil properties view.

data-selection

When you have fine-tuned your search you can download the selected dataset by clicking the Download now button (or restart the selection by clicking Clear Selection).

OSSL Explorer download

Data downloaded from the OSSL Explorer is delivered as a zip file. When unzipped, 5 files are created, in alphabetic order:

  • mir.data.csv [MIR spectral scans]
  • neon.data.csv [NeoSpectra spectral scans]
  • soillab.data.csv [soil laboratory (wet chemistry) data]
  • soilsite.data.csv [sample site data]
  • visnir.data.csv [VIS-NIR spectral scans (excluding NeoSpectra)]

The coding of the data is available at https://soilspectroscopy.github.io/ossl-manual/030-database_description. Note that the coding is changing from time to time, and before using any metadata documentation you need to make sure that you have data and metadata that corresponds.

soilsite.data.csv

The main manual page lists all the site data in text format; the same data is also replicated in tabular form.

soillab.data.csv

The soil laboratory (wet chemistry) data is available in two versions: level 0 and level 1. Level 0 contains all the data whereas level 1 is more restricted. The main page lists both versions indicating which are only available at level 0. The tabular version is divided in two separate tables level 0 and level 1.

visnir.data.csv

The visible to near-inrared (visnir) spectral data is also available in text format and in tabular form.

mir.data.csv

The visible to near-inrared (visnir) spectral data is also available in text format and in tabular form.