goblin_lite.data_processing.crop_data_generator

This module contains the CropDataGenerator class, which is responsible for generating crop data and farm outputs. The class leverages the NationalCropData class to calculate crop data and farm outputs based on scenario-specific and baseline crop data.

Module Contents

Classes

CropDataGenerator

A class to generate crop data and farm outputs for a specified scenario.

class goblin_lite.data_processing.crop_data_generator.CropDataGenerator(calibration_year, target_year, scenario_dataframe)[source]

A class to generate crop data and farm outputs for a specified scenario.

This class is responsible for generating crop data and farm outputs. It leverages the NationalCropData class to calculate crop data and farm outputs based on scenario-specific and baseline crop data.

calibration_year

The year used for calibration.

Type:

int

target_year

The target year for the scenario.

Type:

int

scenario_dataframe

A DataFrame containing scenario-specific input data required for crop output calculations.

Type:

pandas.DataFrame

generate_crop_data()[source]

Generates and returns a Dataframe based on national level crop data.

generate_crop_farm_data()[source]

Generates and returns a DataFrame of farm outputs.

generate_crop_data()[source]

Generates and returns a Dataframe based on national level crop data.

Returns:

A DataFrame containing national level crop data.

Return type:

pandas.DataFrame

generate_crop_farm_data(urea=None, urea_abated=None)[source]

Generates and returns a DataFrame of farm outputs.

Parameters:
  • urea (float) – The amount of urea used for crop production. If not provided, the default value is used.

  • urea_abated (float) – The amount of urea abated. If not provided, the default value is used.

Returns:

A DataFrame containing farm outputs.

Return type:

pandas.DataFrame