crop_lca.resource_manager.data_loader

This module contains the Loader class, which is used to load data from the database and create instances of the models used in the crop LCA model.

Module Contents

Classes

Loader

The Loader class is used to load data from the database and create instances of the models used in the crop LCA model.

class crop_lca.resource_manager.data_loader.Loader(ef_country=None)[source]

The Loader class is used to load data from the database and create instances of the models used in the crop LCA model.

ef_country

The name of the country for which the data is being loaded.

Type:

str

dataframes

An instance of the DataManager class used to load data from the database.

Type:

DataManager

crop_chars

An instance of the CropChars class used to manage the crop characteristics data.

Type:

CropChars

fertiliser

An instance of the Fertiliser class used to manage the fertiliser data.

Type:

Fertiliser

emissions_factors

An instance of the Emissions_Factors class used to manage the emissions factor data.

Type:

Emissions_Factors

upstream

An instance of the Upstream class used to manage the upstream data.

Type:

Upstream

get_crop_chars()[source]

Returns an instance of the CropChars class.

get_fertiliser()[source]

Returns an instance of the Fertiliser class.

get_emissions_factors()[source]

Returns an instance of the Emissions_Factors class.

get_upstream()[source]

Returns an instance of the Upstream class.

get_national_crop_production()[source]

Returns the national crop production data.

get_fao_yield_data(ef_country, index=None)[source]

Returns the FAO yield data for the specified country.

get_crop_chars()[source]

Returns an instance of the CropChars class.

Returns:

An instance of the CropChars class used to manage the crop characteristics data.

Return type:

CropChars

get_fertiliser()[source]

Returns an instance of the Fertiliser class.

Returns:

An instance of the Fertiliser class used to manage the fertiliser data.

Return type:

Fertiliser

get_emissions_factors()[source]

Returns an instance of the Emissions_Factors class.

Returns:

An instance of the Emissions_Factors class used to manage the emissions factor data.

Return type:

Emissions_Factors

get_upstream()[source]

Returns an instance of the Upstream class.

Returns:

An instance of the Upstream class used to manage the upstream data.

Return type:

Upstream

get_national_crop_production()[source]

Returns the national crop production data.

Returns:

The national crop production data.

Return type:

pd.DataFrame

get_fao_yield_data(ef_country, index=None)[source]

Returns the FAO yield data for the specified country.

Parameters:
  • ef_country (str) – The name of the country for which the data is being loaded.

  • index (int, optional) – The index of the data to be returned.

Returns:

The FAO yield data for the specified country.

Return type:

pd.DataFrame