optigob.resource_manager.database_manager ========================================= .. py:module:: optigob.resource_manager.database_manager .. autoapi-nested-parse:: Database Manager Module ======================= This module provides the DatabaseManager class, which is responsible for managing the connection to an SQLite database and retrieving various scaler tables as pandas DataFrames. Classes: DatabaseManager: Manages database connections and retrieves scaler tables. .. method:: create_engine Creates a SQLAlchemy engine connected to the SQLite database. .. method:: get_ad_area_scaler_table Retrieves the 'ad_area_scalers' table. .. method:: get_ad_emission_scaler_table Retrieves the 'ad_emission_scalers' table. .. method:: get_crop_protein_scaler_table Retrieves the 'protein_crop_scalers' table. .. method:: get_crop_scaler_table Retrieves the 'crop_scalers' table. .. method:: get_forest_scaler_table Retrieves the 'forest_scalers' table. .. method:: get_forest_scaler_wood_output_table Retrieves the 'forest_scaler_wood_output' table. .. method:: get_hwp_scaler_table Retrieves the 'hwp_scalers' table. .. method:: get_livestock_area_scaler_table Retrieves the 'animal_area_scalers' table. .. method:: get_livestock_emission_scaler_table Retrieves the 'animal_emission_scalers' table. .. method:: get_livestock_protein_scaler_table Retrieves the 'animal_protein_scalers' table. .. method:: get_organic_soil_area_scaler_table Retrieves the 'organic_soils_area_scalers' table. .. method:: get_organic_soil_emission_scaler_table Retrieves the 'organic_soils_emission_scalers' table. .. method:: get_protein_crop_emission_scaler_table Retrieves the 'protein_crop_emission_scalers' table. .. method:: get_protein_crop_protein_scaler_table Retrieves the 'protein_crop_protein_scalers' table. .. method:: get_static_forest_scaler_table Retrieves the 'static_forest_scalers' table. .. method:: get_static_livestock_area_scaler_table Retrieves the 'static_animal_area_scalers' table. .. method:: get_static_livestock_emission_scaler_table Retrieves the 'static_animal_emission_scalers' table. .. method:: get_static_livestock_protein_scaler_table Retrieves the 'static_animal_protein_scalers' table. .. method:: get_substitution_scaler_table Retrieves the 'substitution_scalers' table. .. method:: get_willow_bioengery_scaler_table Retrieves the 'willow_bioenergy_scalers' table. .. method:: get_wood_ccs_scaler_table Retrieves the 'wood_ccs_scalers' table. Classes ------- .. autoapisummary:: optigob.resource_manager.database_manager.DatabaseManager Module Contents --------------- .. py:class:: DatabaseManager(database_path=None) .. py:attribute:: engine :value: None .. py:method:: create_engine() Creates a SQLAlchemy engine connected to the SQLite database specified by self.database_path. :returns: A SQLAlchemy engine instance connected to the specified SQLite database. :rtype: sqlalchemy.engine.Engine .. py:method:: get_ad_area_scaler_table() Retrieves the 'ad_area_scalers' table from the database. :returns: DataFrame containing the 'ad_area_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_ad_emission_scaler_table() Retrieves the 'ad_emission_scalers' table from the database. :returns: DataFrame containing the 'ad_emission_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_crop_protein_scaler_table() Retrieves the 'protein_crop_scalers' table from the database. :returns: DataFrame containing the 'protein_crop_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_crop_scaler_table() Retrieves the 'crop_scalers' table from the database. :returns: DataFrame containing the 'crop_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_forest_scaler_table() Retrieves the 'forest_scalers' table from the database. :returns: DataFrame containing the 'forest_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_forest_scaler_wood_output_table() Retrieves the 'forest_scaler_wood_output' table from the database. :returns: DataFrame containing the 'forest_scaler_wood_output' table data. :rtype: pandas.DataFrame .. py:method:: get_hwp_scaler_table() Retrieves the 'hwp_scalers' table from the database. :returns: DataFrame containing the 'hwp_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_livestock_area_scaler_table() Retrieves the 'animal_area_scalers' table from the database. :returns: DataFrame containing the 'animal_area_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_livestock_emission_scaler_table() Retrieves the 'animal_emission_scalers' table from the database. :returns: DataFrame containing the 'animal_emission_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_livestock_protein_scaler_table() Retrieves the 'animal_protein_scalers' table from the database. :returns: DataFrame containing the 'animal_protein_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_organic_soil_area_scaler_table() Retrieves the 'organic_soils_area_scalers' table from the database. :returns: DataFrame containing the 'organic_soils_area_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_organic_soil_emission_scaler_table() Retrieves the 'organic_soils_emission_scalers' table from the database. :returns: DataFrame containing the 'organic_soils_emission_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_protein_crop_emission_scaler_table() Retrieves the 'protein_crop_emission_scalers' table from the database. :returns: DataFrame containing the 'protein_crop_emission_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_protein_crop_protein_scaler_table() Retrieves the 'protein_crop_protein_scalers' table from the database. :returns: DataFrame containing the 'protein_crop_protein_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_static_forest_scaler_table() Retrieves the 'static_forest_scalers' table from the database. :returns: DataFrame containing the 'static_forest_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_static_livestock_area_scaler_table() Retrieves the 'static_animal_area_scalers' table from the database. :returns: DataFrame containing the 'static_animal_area_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_static_livestock_emission_scaler_table() Retrieves the 'static_animal_emission_scalers' table from the database. :returns: DataFrame containing the 'static_animal_emission_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_static_livestock_protein_scaler_table() Retrieves the 'static_animal_protein_scalers' table from the database. :returns: DataFrame containing the 'static_animal_protein_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_substitution_scaler_table() Retrieves the 'substitution_scalers' table from the database. :returns: DataFrame containing the 'substitution_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_willow_bioengery_scaler_table() Retrieves the 'willow_bioenergy_scalers' table from the database. :returns: DataFrame containing the 'willow_bioenergy_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_wood_ccs_scaler_table() Retrieves the 'wood_ccs_scalers' table from the database. :returns: DataFrame containing the 'wood_ccs_scalers' table data. :rtype: pandas.DataFrame .. py:method:: get_protein_content_scaler_table() Retrieves the 'protein_content' table from the database. :returns: DataFrame containing the 'protein_content' table data. :rtype: pandas.DataFrame