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
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:
- crop_chars
An instance of the CropChars class used to manage the crop characteristics data.
- Type:
- fertiliser
An instance of the Fertiliser class used to manage the fertiliser data.
- Type:
- emissions_factors
An instance of the Emissions_Factors class used to manage the emissions factor data.
- Type:
- 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:
- 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:
- 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:
- 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:
- 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