soilstats.soildata

Module Contents

Classes

SoilData

Class for collecting and analyzing soil data.

class soilstats.soildata.SoilData(lat: float, lon: float, properties: list, depths: list, values: list)[source]

Bases: soilstats.analysis.analysis.Analyse

Class for collecting and analyzing soil data.

_property_key = 'properties'[source]
_layer_key = 'layers'[source]
_record_path = ['depths'][source]
_meta = ['name', ['unit_measure', 'mapped_units']][source]
_boundaries[source]
_clean_columns[source]
_first_columns = ['lat', 'lon', 'property'][source]
get_data()[source]

Return data from the SoilGrids API as a data frame.

_get_data()[source]

Get data from the SoilGrids API.

Use the properties to call the SoilGrids API. Generate a data frame fom the API response.

_clean_data()[source]

Clean up the data frame.

  • rename obscurely named columns

  • add latitude and longitude

  • reorder columns to increase readability

_setup_soilgrid()[source]

Initialize SoilGrids object.

classmethod _verify(value, datatype)[source]

Verify that latitude/longitude are within boundaries.

classmethod _enlist(value)[source]

Enlist value if it is not a list.